Re: Am I really stupid???

Поиск
Список
Период
Сортировка
От Lincoln Yeoh
Тема Re: Am I really stupid???
Дата
Msg-id 3.0.5.32.20000519090554.008e9ad0@pop.mecomb.po.my
обсуждение исходный текст
Ответ на Re: Am I really stupid???  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Am I really stupid???  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
At 11:18 AM 17-05-2000 -0400, Tom Lane wrote:
>In fact, IN (subselect), INTERSECT, and EXCEPT are all pretty much the
>same thing, and they're all pretty slow in the current code :-(, because
>they all work by rescanning the inner query for each outer tuple --- in
>other words, they're all implemented like plain nestloop joins.  EXISTS
>is marginally better because the planner can figure out how to use an
>index on the inner table, if there is one.

Does that mean for two tables, one 1000 rows another 2000 rows, it's a
total of 1000 X 2000 rows scanned?

I suppose one way to slightly reduce the number of rows would be to select
stuff into temp tables first.

Cheerio,
Link.


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

Предыдущее
От: Margaretha Sulistyoningsih
Дата:
Сообщение: Can postgres saving file ?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Am I really stupid???