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.

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Reply via email to