Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-23 Thread Pierre-Frdric Caillaud
On Mon, 13 Dec 2004 17:43:07 -0500, Tom Lane [EMAIL PROTECTED] wrote: Sven Willenberger [EMAIL PROTECTED] writes: explain analyze select storelocation,order_number from custacct where referrer = 1365 and orderdate between '2004-12-07' and '2004-12-07 12:00:00' order by custacctid limit 10;

Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-14 Thread Sven Willenberger
On Mon, 2004-12-13 at 17:43 -0500, Tom Lane wrote: Sven Willenberger [EMAIL PROTECTED] writes: explain analyze select storelocation,order_number from custacct where referrer = 1365 and orderdate between '2004-12-07' and '2004-12-07 12:00:00' order by custacctid limit 10;

Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-14 Thread Tom Lane
Sven Willenberger [EMAIL PROTECTED] writes: On a related note, is there a way (other than set enable_seqscan=off) to give a hint to the planner that it is cheaper to use and index scan versus seq scan? There are basically two things you can do. One: if the planner's rowcount estimates are

Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-13 Thread Andrew McMillan
On Mon, 2004-12-13 at 01:13 -0500, Sven Willenberger wrote: I have a question regarding a serious performance hit taken when using a LIMIT clause. I am using version 7.4.6 on FreeBSD 4.10-STABLE with 2GB of memory. The table in question contains some 25 million rows with a bigserial primary

Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-13 Thread Sven Willenberger
Andrew McMillan wrote: On Mon, 2004-12-13 at 01:13 -0500, Sven Willenberger wrote: I have a question regarding a serious performance hit taken when using a LIMIT clause. I am using version 7.4.6 on FreeBSD 4.10-STABLE with 2GB of memory. The table in question contains some 25 million rows with

Re: [PERFORM] Using LIMIT changes index used by planner

2004-12-13 Thread Tom Lane
Sven Willenberger [EMAIL PROTECTED] writes: explain analyze select storelocation,order_number from custacct where referrer = 1365 and orderdate between '2004-12-07' and '2004-12-07 12:00:00' order by custacctid limit 10; QUERY PLAN

[PERFORM] Using LIMIT changes index used by planner

2004-12-12 Thread Sven Willenberger
I have a question regarding a serious performance hit taken when using a LIMIT clause. I am using version 7.4.6 on FreeBSD 4.10-STABLE with 2GB of memory. The table in question contains some 25 million rows with a bigserial primary key, orderdate index and a referrer index. The 2 select