Re: insane index scan times

Поиск
Список
Период
Сортировка
Искать
От
Alvaro Herrera
Тема
Re: insane index scan times
Дата
Msg-id
20070603230502.GD3813@alvh.no-ip.org
Ответ на
insane index scan times (Sergei Shelukhin)
Список
Дерево обсуждения
insane index scan times Sergei Shelukhin <realgeek@gmail.com>
Re: insane index scan times Alvaro Herrera <alvherre@commandprompt.com>
Re: insane index scan times Sergei Shelukhin <realgeek@gmail.com>
Re: insane index scan times Martijn van Oosterhout <kleptog@svana.org>
Re: insane index scan times Sergei Shelukhin <realgeek@gmail.com>
Re: insane index scan times Martijn van Oosterhout <kleptog@svana.org>
Re: insane index scan times "Alexander Staubo" <alex@purefiction.net>
Re: insane index scan times Alvaro Herrera <alvherre@commandprompt.com>
Re: insane index scan times Tom Lane <tgl@sss.pgh.pa.us>
Re: insane index scan times "hubert depesz lubaczewski" <depesz@gmail.com>
Re: insane index scan times Scott Marlowe <smarlowe@g2switchworks.com>
Sergei Shelukhin escribió:

> explain select * from entries inner join stuff on entries.id =
> stuff.id;
> 
>  ->  Seq Scan on stuff  (cost=0.00..193344.00 rows=12550400 width=12)
> 
> 
> set enable_seqscan = off;
> 
> explain select * from entries inner join stuff on entries.id =
> stuff.id;
> 
>  ->  Index Scan using blah on stuff  (cost=0.00..25406232.30
> rows=12550400 width=12)
> 
> Query execution resuls are consistent w/explain. wtf? no I mean,
> WTF?????!!!!!!!!!!!!!!!!!!!
> 
> Sorry. But I 'm amazed.

I am not.  You are asking it to give you 12 million rows -- so it does.
What's the surprise if it takes long?

Do you really want to have all 12 million rows as a result?

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.
В списке pgsql-general по дате отправления
От: Alexander Staubo
Дата:
Сообщение: Re: multimaster
От: Ron Johnson
Дата:
FAQ