[development] Advanced DB features was: RFC: drupal as a moving target
Joshua D. Drake
jd at commandprompt.com
Wed Apr 30 17:25:13 UTC 2008
On Wed, 30 Apr 2008 19:06:24 +0200
Ivan Sergio Borgonovo <mail at webthatworks.it> wrote:
> Interesting. I'm doing the same but I haven't touched core to avoid a
> further burden in maintenance if I've to keep up with security
Well we try to stay out of that as well if we can but sometimes you
just can't (like using Tsearch2).
> I think it would be enlightening to see where you exploited more
> advanced DB functions. Even if I suppose you did with one DB in mind
> it would still be interesting to know which were the features and
> where you thought they really fit because D7 should support much more
> DB features.
Actually it should be fairly easy to do if the API is abstracted out
correctly. The things I see needing to be done (and I admit that I
haven't even looked at 7):
* Abstract out page renders into custom calls.
* So the node call checks to see if its predetermined (and thus
draws whatever is in the db to draw), like the front page.
* Or, if a node load exists (terminology as you like) it would call
whatever you want.
Case in point, Drupal can easily execute 200 queries to draw a page.
Why do we do that? It's dumb and inefficient. You lose 30ms for every
single query just in TCP negotiation. You push that to 5 stored
procedures that draw blocks, and you have shaved ~ 5 seconds off your
load in just negotiation. Add a cached procedure and you could shave
another ~ 5 seconds off.
> Even if I doubt support for stored procedures is going
> to find its way into Drupal since the core has to remain DB
I doubt that is actually an issue. I understand that we have to dumb
things down for the dolphin but that doesn't mean the api can't be
smart about it.
If Catalyst can do it...
>and I think providing an abstraction layer to sp is hard some
> oversight may help to see which are the features that could be more
> relevant to support... I'm at least thinking to transactions.
Ahh but it can. Remember that even the dolphin has stored procedures.
Joshua D. Drake
The PostgreSQL Company since 1997: http://www.commandprompt.com/
PostgreSQL Community Conference: http://www.postgresqlconference.org/
United States PostgreSQL Association: http://www.postgresql.us/
Donate to the PostgreSQL Project: http://www.postgresql.org/about/donate
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 189 bytes
Desc: not available
Url : http://lists.drupal.org/pipermail/development/attachments/20080430/7388bc09/attachment.pgp
More information about the development