Who can resolve this BUG ?

Who can resolve this BUG ?

Post by Alexander Dedere » Fri, 18 May 2001 14:37:22



INM1=# explain select ref_num from grls where ag_id in (24);
Index Scan using grls_ag_id on grls  (cost=0.00..597.87 rows=849 width=12)

IMN1=# explain select ref_num from grls where ag_id in (select 24);
Seq Scan on grls  (cost=0.00..992.44 rows=30195 width=12)
  SubPlan
    ->  Materialize  (cost=0.00..0.00 rows=0 width=0)
          ->  Result  (cost=0.00..0.00 rows=0 width=0)

IMN1=# explain select ref_num from grls where ag_id = (select 24);
Index Scan using grls_ag_id on grls  (cost=0.00..597.87 rows=849 width=12)
  InitPlan
    ->  Result  (cost=0.00..0.00 rows=0 width=0)

". . . in (24)  " work in 35 faster than ". . . in (select 24)". In the
last don't use indices for increase perfomans.
It's  been normaly work in PostgreSQL version 7.2 ? Or not?

P.S.
Sorry my English.

 
 
 

Who can resolve this BUG ?

Post by Gregory Woo » Sun, 20 May 2001 03:18:51


Quote:> IMN1=# explain select ref_num from grls where ag_id = (select 24);
> Index Scan using grls_ag_id on grls  (cost=0.00..597.87 rows=849 width=12)
>   InitPlan
>     ->  Result  (cost=0.00..0.00 rows=0 width=0)

> ". . . in (24)  " work in 35 faster than ". . . in (select 24)". In the
> last don't use indices for increase perfomans.
> It's  been normaly work in PostgreSQL version 7.2 ? Or not?

http://www.ca.postgresql.org/docs/faq-english.html#4.23

Greg

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command