Hi,
another interesting thing...
This is current 7.1.
slygreetings=> explain select * from users where variant_id=5 AND active='f'
order by rcptdate,variant_id,active limit 60;
NOTICE: QUERY PLAN:
Limit (cost=13005.10..13005.10 rows=60 width=145)
-> Sort (cost=13005.10..13005.10 rows=3445 width=145)
-> Index Scan using users_rcptdate_vid_key on users
(cost=0.00..12658.35 rows=3445 width=145)
EXPLAIN
slygreetings=> set enable_sort to off;
SET VARIABLE
slygreetings=> explain select * from users where variant_id=5 AND active='f'
order by rcptdate,variant_id,active limit 60;
NOTICE: QUERY PLAN:
Limit (cost=100013005.10..100013005.10 rows=60 width=145)
-> Sort (cost=100013005.10..100013005.10 rows=3445 width=145)
-> Index Scan using users_rcptdate_vid_key on users
(cost=0.00..12658.35 rows=3445 width=145)
EXPLAIN
Cost is something really wierd.... Why?
--
Sincerely Yours,
Denis Perchine
----------------------------------
E-Mail: dyp@perchine.com
HomePage: http://www.perchine.com/dyp/
FidoNet: 2:5000/120.5
----------------------------------