Re: Query plan and sub-queries

Поиск
Список
Период
Сортировка
От Steve Heaven
Тема Re: Query plan and sub-queries
Дата
Msg-id 3.0.1.32.20000808134734.00700ed4@mail.thornet.co.uk
обсуждение исходный текст
Ответ на Re: Query plan and sub-queries  (Mike Mascari <mascarm@mascari.com>)
Список pgsql-general
At 08:24 08/08/00 -0400, you wrote:
> A workaround is to replace IN with EXISTS:

This still does a sequential rather that indexed scan:

explain select * from books_fti where exists
      (select R1684.stockno from R1684,books_fti where
R1684.stockno=books_fti.stockno );

Result  (cost=79300.27 rows=0 width=0)
  InitPlan
    ->  Nested Loop  (cost=2093.00 rows=1024706 width=24)
      ->  Seq Scan on r1684  (cost=43.00 rows=1000 width=12)
      ->  Index Scan using allbooks_isbn on books_fti  (cost=2.05
rows=1024705 width=12)
  ->  Seq Scan on books_fti  (cost=79300.27 rows=1024705 width=160)

--
thorNET  - Internet Consultancy, Services & Training
Phone: 01454 854413
Fax:   01454 854412
http://www.thornet.co.uk

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

Предыдущее
От: Philip Warner
Дата:
Сообщение: RE: pg_dump help
Следующее
От: "Robert D. Nelson"
Дата:
Сообщение: RE: pg_dump help