Re: strange explain - Mailing list pgsql-hackers

From Rod Taylor
Subject Re: strange explain
Date
Msg-id 04a601c1fa91$4bc4dfc0$0f02000a@jester
Whole thread Raw
In response to strange explain  (Oleg Bartunov <oleg@sai.msu.su>)
Responses Re: strange explain  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
It appears it scanes the type_idx once per opereator.  IN gets broken
down into ORs

Is this what the TODO entry 'Make IN / NOT IN have similar performance
as EXISTS' means?
--
Rod
----- Original Message -----
From: "Oleg Bartunov" <oleg@sai.msu.su>
To: "Pgsql Hackers" <pgsql-hackers@postgresql.org>; "Tom Lane"
<tgl@sss.pgh.pa.us>
Sent: Monday, May 13, 2002 9:42 AM
Subject: [HACKERS] strange explain


> Hi,
>
>
> I've got performance problem and while I'dont ready to describe it
> I'd like to ask about strange explain:
>
> tour=# explain analyze  select * from tours  where
>              ( operator_id in (2,3,4,5,7) and type_id = 2 )  or
>              ( operator_id = 8 and type_id=4 );
>
> NOTICE:  QUERY PLAN:
>
> Index Scan using type_idx, type_idx, type_idx, type_idx, type_idx,
type_idx on tours  (cost=0.00..12.25 rows=1 width=1091) (actual
time=0.26..0.26 rows=0 loops=1)
> Total runtime: 0.45 msec
>
> EXPLAIN
>
> What does many 'type_idx' means ?
>
> Theare are 2 indices - operator_idx and type_idx.
>
>
> Regards,
> Oleg
> _____________________________________________________________
> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
> Sternberg Astronomical Institute, Moscow University (Russia)
> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
> phone: +007(095)939-16-83, +007(095)939-23-83
>
>
> ---------------------------(end of
broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
>     (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)
>



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Join of small table with large table
Next
From: Tom Lane
Date:
Subject: Re: strange explain