Re: query optimization
| From: | Chris | Date: | Fri, 26 Sep 2008 00:19:02 +0000 |
| Subject: | Re: query optimization | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-45463@lists.php.net to get a copy of this message | ||
Jack van Zanen wrote:
Hi If I am not mistaken, the second part of the union contains all rows that are in the first part of the union. just remove the first part.Kind of. The first part is a join, the second isn't. I was going to suggest rewriting the subquery into a single: where ip.blockid in (...) or bu.blockid in (...) however that'll probably be slower, but def. worth a try. -- Postgresql & php tutorials http://www.designmagick.com/