Re: A question on the query planner
| От | Robert Treat |
|---|---|
| Тема | Re: A question on the query planner |
| Дата | |
| Msg-id | 1070385381.24915.8650.camel@camel обсуждение исходный текст |
| Ответ на | A question on the query planner (Jared Carr <jared@89glass.com>) |
| Ответы |
Re: A question on the query planner
|
| Список | pgsql-performance |
On Mon, 2003-12-01 at 16:44, Jared Carr wrote:
> I am currently working on optimizing some fairly time consuming queries
> on a decently large
> dataset.
>
> The Following is the query in question.
>
> SELECT z.lat, z.lon, z.city, z.state, q.date_time, c.make, c.model, c.year
> FROM quotes AS q, zips AS z, cars AS c
> WHERE
> z.zip = q.zip AND
> c.car_id = q.car_id AND
> z.state != 'AA' AND
> z.state != 'AE' AND
> z.state != 'AP' AND
> z.state = 'WA'
> ORDER BY date_time;
>
This wont completely solve your problem, but z.state = 'WA' would seem
to be mutually exclusive of the != AA|AE|AP. While it's not much, it is
extra overhead there doesn't seem to be any need for...
Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL
В списке pgsql-performance по дате отправления: