RE: [PHP] SQL Syntax [improved SQL]

2010-06-16 Thread Tommy Pham
> -Original Message- > From: Jan Reiter [mailto:the-fal...@gmx.net] > Sent: Wednesday, June 16, 2010 8:55 AM > To: php-general@lists.php.net > Subject: Re: [PHP] SQL Syntax [improved SQL] > > Hi, > > this is the solution I came up with, that is over 10

Re: [PHP] SQL Syntax [improved SQL]

2010-06-16 Thread Jan Reiter
Hi, this is the solution I came up with, that is over 10 times faster than my first attemps. Tested @31,871 entries in table 'picture' and 222,712 entries in table 'picture_attrib_rel'. Old Version: SELECT * FROM picture as p INNER JOIN picture_attrib_rel as pr1 ON (p.pid = pr1.pid) INNER