in reply to Basic Perl trumps DBI? Or my poor DB design?
For a single-tasking, (ie. no concurrency issues) application, a well-written, non-DB (RDBMS) solution will always be able to out-perform an RDBMS solution for any given task.
Simple logic. Whatever steps are required to produce a given set of results, all those steps still need to happen regardless of whether you code them yourself, or whether they are performed by the RDBMS on your behalf.
When you code them yourself, you can optimise those steps specifically to the your requirements.
When the equivalent steps are performed by the DB, they will be optimised for the general case. I addition, the RDBMS will also have the overhead of:
However, performance is not the primary reason for storing your data in an RDBMS--all of those overheads are.
Once you store your data in an RDBMS, when a second application comes along that needs to access the same data in a different way, or combine it with other data:
These are all very good reasons for using an RDBMS. It's not all sweetness and light. SQL is a pain, normalising data to allow for efficient access for conflicting uses is a (black) art form. Database optimisation is hard, simply because you do not have full control, and there are many conflicting issues that need to be considered.
The very worst reason for considering moving data into an RDBMS is ultimate performance. That's not to say that achieving a reasonable performance isn't possible with an RDBMS. Nor even that, given the amount of effort expended by generally very clever people, over long periods of time, to develop, refine and tune RDBMS performance, that it won't do a better job, more quickly, than most of us will be able to achieve at our first (or even second or third) attempts at a given problem.
It just means that you cannot have all of the additional benefits that you get from using them, without paying some price; and that price is a reduction in ultimate performance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Basic Perl trumps DBI? Or my poor DB design?
by jfroebe (Parson) on Oct 23, 2004 at 15:02 UTC | |
by BrowserUk (Patriarch) on Oct 23, 2004 at 19:16 UTC | |
by jfroebe (Parson) on Oct 23, 2004 at 21:30 UTC |