Re: [repost] partial index / funxtional idx or bad sql?

Поиск
Список
Период
Сортировка
От Stephan Szabo
Тема Re: [repost] partial index / funxtional idx or bad sql?
Дата
Msg-id 20030512204533.I20042-100000@megazone23.bigpanda.com
обсуждение исходный текст
Ответ на Re: [repost] partial index / funxtional idx or bad sql?  (csajl <csajl@yahoo.com>)
Ответы Re: [repost] partial index / funxtional idx or bad sql?  (csajl <csajl@yahoo.com>)
Список pgsql-performance
On Mon, 12 May 2003, csajl wrote:

> i'm using 7.3.2.  i tried using EXISTS instead of the IN, but the same query
> now returns in seven sceonds as opposed to four with the IN.
>
>
> cmdb=# EXPLAIN ANALYZE
> cmdb-# select c.class_id, c.areacode, c.title from classifieds c
> cmdb-# where c.class_cat_id = '1'
> cmdb-# and c.areacode IN (
> cmdb(# select areacode from cm_areacode where site_id = '10')
> cmdb-# ;

How about something like:

select c.class_id, c.areacode, c.title from
 classifieds c,
 (select distinct areacode from cm_areacode where site_id='10') a
 where c.class_cat_id='1' and c.areacode=a.areacode;


В списке pgsql-performance по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: [repost] partial index / funxtional idx or bad sql?
Следующее
От: csajl
Дата:
Сообщение: Re: [repost] partial index / funxtional idx or bad sql?