Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-23 Thread Michael Stone
On Sat, Jul 22, 2006 at 10:26:53AM -0700, Craig A. James wrote: This causes massive file-system activity and flushes all files that the kernel has cached. If you run this between each Postgres test (let it run for a couple minutes), it gives you an apples-to-apples comparison between

Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-23 Thread Craig A. James
Michael Stone wrote: On Sat, Jul 22, 2006 at 10:26:53AM -0700, Craig A. James wrote: This causes massive file-system activity and flushes all files that the kernel has cached. If you run this between each Postgres test (let it run for a couple minutes), it gives you an apples-to-apples

Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-22 Thread Tom Lane
[EMAIL PROTECTED] writes: I have been testing the performance of PostgreSQL using the simple tool found at http://benchw.sourceforge.net however I have found that all the queries it run execute with sequential scans. The website where the code runs has examples of the execution plan using

Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-22 Thread Craig A. James
The real issue here is caching across successive queries, an effect that Postgres doesn't deal with very well at the moment. If you run these queries from a standing start (freshly booted machine) you'll likely find that the indexscan plan is indeed slower than the seqscan/hash plan, just like

Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-22 Thread Mark Kirkwood
Tom Lane wrote: [EMAIL PROTECTED] writes: I have been testing the performance of PostgreSQL using the simple tool found at http://benchw.sourceforge.net however I have found that all the queries it run execute with sequential scans. The website where the code runs has examples of the execution

Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-22 Thread Mark Kirkwood
[EMAIL PROTECTED] wrote: I have been testing the performance of PostgreSQL using the simple tool found at _http://benchw.sourceforge.net_ however I have found that all the queries it run execute with sequential scans. The website where the code runs has examples of the execution plan using

[PERFORM] Forcing using index instead of sequential scan?

2006-07-21 Thread robin.c.smith
Title: Forcing using index instead of sequential scan? I have been testing the performance of PostgreSQL using the simple tool found at http://benchw.sourceforge.net however I have found that all the queries it run execute with sequential scans. The website where the code runs has examples

Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-21 Thread robin.c.smith
: [PERFORM] Forcing using index instead of sequential scan? [EMAIL PROTECTED] wrote: What is the best way to force the use of indexes in these queries? Well, the brute-force method is to use SET enable_seqscan TO off, but if you want to get to the bottom of this, you should look at or post

Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-21 Thread robin.c.smith
The tables have all been analysed. I set the work_mem to 50 and it still doesn't use the index :-( Regards Robin -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: 21 July 2006 12:54 To: Smith,R,Robin,XJE4JA C Subject: Re: [PERFORM] Forcing using index instead

Re: [PERFORM] Forcing using index instead of sequential scan?

2006-07-21 Thread Peter Eisentraut
[EMAIL PROTECTED] wrote: What is the best way to force the use of indexes in these queries? Well, the brute-force method is to use SET enable_seqscan TO off, but if you want to get to the bottom of this, you should look at or post the EXPLAIN ANALYZE output of the offending queries. -- Peter