Re: query optimization

From: Date: Sun, 28 Sep 2008 22:28:43 +0000
Subject: Re: query optimization
References: 1 2 3 4 5  Groups: php.db 
Request: Send a blank email to php-db+get-45492@lists.php.net to get a copy of this message
Yves Sucaet wrote:
Hi Jack, I'm expecting less than 10 records in the resulting set. The BlockUnit table contains 337,253 records; the InteractionParts table contains 279,953 records. It takes currently 8.3 seconds to execute the query as I have it. Erh, this is embarassing but I'm going to need some help re-writing it with EXISTS... Thanks for the help so far,
You haven't said which parts of the query is slow. Try: Just the subselect query. If that's slow, try just the first part of the union. If that's not slow, try the second part. At least you'll know where to concentrate. -- Postgresql & php tutorials http://www.designmagick.com/

« previous php.db (#45492) next »