[development] Guidelines for writing efficient SQL code

Gerhard Killesreiter gerhard at killesreiter.de
Wed Aug 26 00:25:13 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jean-Michel Pouré schrieb:
> Dear Friends, 
> 
> I welcome your comments on this short guide for writing efficient SQL
> code in Drupal: http://drupal.org/node/559302
> 
> Feel free to start hunting for speed on the two issues mentioned
> (logging and LEFT JOINs). I will add several tips in the next days.
> 
> The forum code proved to be heavily broken and I could debug it in 4
> hours. So it is very likely that the entire Drupal 6.dev is at stake.
> Probably Drupal 7 alpha too.
> 
> Because Drupal makes little use of LEFT JOINs in the code, it is likely
> that it cannot scale well. Hence a reputation to be slow. But it can
> change rapidly if you fix the code and apply the tips.
> 
> I will be back tomorrow with more tips. 
> Hunt for speed now!


Your "tips" are mostly garbage. They may help certain queries under
certain RDBMSses, but are not generally applicable.

Cheers,
	Gerhard, who actually spent some time to _remove_ LEFT JOINS in Drupal
4.x because they were slower...


P.S.: If you ever mention something like "we should leave mysql and go
pgsql only because mysql is not a serious database" again, I'll block
your account on d.o. There's enough stupid in the world, we don't need
to give it a place on d.o.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkqUgOkACgkQfg6TFvELooRolACfbCk/RHEKDIEM8kGWOi4lEE3l
0vgAoLjKQ61D57Lc6l8mAnOvC53COsmj
=vq0l
-----END PGP SIGNATURE-----


More information about the development mailing list