[wp-hackers] Consolidating database tables and other
computerguru at neosmart.net
Mon Apr 9 19:59:31 GMT 2007
I fully agree with all the points your making with regards to query
But I firmly believe that the slight overhead introduced by database
abstraction is more than made up for by the more streamlined queries.
Obviously streamlined queries w/o database abstraction is even better, but 1
statement with 2 joins is by far much more efficient than 4 queries....
> -----Original Message-----
> From: wp-hackers-bounces at lists.automattic.com [mailto:wp-hackers-
> bounces at lists.automattic.com] On Behalf Of Steve Lewis
> Sent: Monday, April 09, 2007 10:56 PM
> To: wp-hackers at lists.automattic.com
> Subject: Re: [wp-hackers] Consolidating database tables and other
> assorted items
> On 4/9/07, Computer Guru <computerguru at neosmart.net> wrote:
> > Thank you Robert!
> Database normalization almost always equals more tables - but hundred-
> > flexibility.
> More tables, I agree. Flexibility? I don't know about that.
> I'm sure I missed one or two important things, but how a post +
> comments =
> > 20 queries on a stock WP *without a single plugin* is beyond me.
> > The thing is - since the WP data is well distributed and properly
> > (the WP db-structure is fairly well done, with the exception of
> foreign keys
> > IMO) why does it take so many queries to do so little?
> Normalization increases the complexity of data retrieval, and therefore
> complexity of the queries necessary. The point of normalization is not
> simplify but to promote data integrity. With that level of complexity,
> either you have to perform more queries, or more join operations within
> queries. The WP API discourages joins, generally. That is why it
> takes 20
> queries to do so little.
> You would have to begin de-normalizing the database, or consider using
> views, to reduce the number of queries per page without cutting
> I think if WP ever gets a database abstraction layer - even if it's
> > something as heavy as MDB2/PearDB - it'll perform *better* since a
> hell of a
> > lot of queries will be consolidated.
> I doubt that. I seriously doubt that. Especially because it makes it
> harder to perform the optimal joins for the current context.
> in the middleware defeat the value of the RDBMS. That is just the way
> it is
> in my experience.
> I would love to know why I am wrong.
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
More information about the wp-hackers