Re: [SQL] Help with a seq scan on multi-million row table

2006-05-11 Thread ogjunk-pgjedan
Hello Andrew, Markus, and Tom - thanks for all the help! You've just helped a large Simpy community! :) I'll try to post some performance charts to http://blog.simpy.com/ shortly. In short, this immediately dropped the load from 2-3-4-5-6-7+ to circa 0.25. Thanks! Otis - Original Message

Re: [SQL] Help with a seq scan on multi-million row table

2006-05-11 Thread Andrew Sullivan
On Thu, May 11, 2006 at 10:09:44AM -0700, [EMAIL PROTECTED] wrote: > Hi Markus & Tom, > > Higher statistics for this column hm, I'd love to try changing > it to see how that changes things, but I'm afraid I don't know how > to do that. How can I change the statistics target value for this > c

Re: [SQL] Help with a seq scan on multi-million row table

2006-05-11 Thread ogjunk-pgjedan
Hi Markus & Tom, Higher statistics for this column hm, I'd love to try changing it to see how that changes things, but I'm afraid I don't know how to do that. How can I change the statistics target value for this column? Ah, I think I found the place: => select * from pg_attribute where

Re: [SQL] Multi-column index not used, new flipped column index is

2006-05-11 Thread Andreas Kretschmer
[EMAIL PROTECTED] <[EMAIL PROTECTED]> schrieb: > Hi Andreas and Markus, > > Bitmap indices sound like a good reason to go from 8.0 to 8.1. Is 8.2 > around the corner, by any chance? IIRC in autumn/winter. If it is finish ;-) > > I searched PG docs to see if I need to do something special to c

Re: [SQL] Help with a seq scan on multi-million row table

2006-05-11 Thread Tom Lane
Markus Schaber <[EMAIL PROTECTED]> writes: > Did you try to set higher statistics targets for this columns? Yeah, I was about to suggest the same after looking at the pg_stats entry. It shows estimated num_distinct as 60825, ie only about 60k distinct values in the column, which sounds kinda low

Re: [SQL] Help with a seq scan on multi-million row table

2006-05-11 Thread Markus Schaber
Hi, Otis, [EMAIL PROTECTED] wrote: > I'm not sure which numbers you are referring to when you said the estimate is > off, but here are some numbers: > The whole table has 6-7 M rows. > That query matches about 2500 rows. > > If there are other things I can play with and help narrow this dow