Re: [GENERAL] indexes are fucked

2005-08-04 Thread Chris Travers
Dr NoName wrote: Hi all, I got another problem with postgres. This time it refuses to use the indexes. Check this out: If you would like help, first try posting queries and EXPLAIN ANALYZE dumps. Also you may have better luck with the Performance list ([EMAIL PROTECTED]). Best Wishes, Chr

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Joshua D. Drake
than others. Sincerely, Joshua D. Drake Bob Pawley - Original Message - From: "Jaime Casanova" <[EMAIL PROTECTED]> To: "Dr NoName" <[EMAIL PROTECTED]> Cc: "Ragnar Hafstað" <[EMAIL PROTECTED]>; Sent: Tuesday, August 02, 2005 12:57 PM

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Bob Pawley
riginal Message - From: "Jaime Casanova" <[EMAIL PROTECTED]> To: "Dr NoName" <[EMAIL PROTECTED]> Cc: "Ragnar Hafstað" <[EMAIL PROTECTED]>; Sent: Tuesday, August 02, 2005 12:57 PM Subject: Re: [GENERAL] indexes are fucked On 8/2/05, Dr NoName <

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Jaime Casanova
On 8/2/05, Dr NoName <[EMAIL PROTECTED]> wrote: > Thanks Ragnar. That solved the problem. I still would > like some explanation about this voodoo. Most > importantly, how can I estimage a "good" statistics > number? > > thanks, > > Eugene http://www.postgresql.org/docs/8.0/static/planner-stats.h

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Dr NoName
Thanks Ragnar. That solved the problem. I still would like some explanation about this voodoo. Most importantly, how can I estimage a "good" statistics number? thanks, Eugene --- Dr NoName <[EMAIL PROTECTED]> wrote: > > the seqscan is cheaper when a large enough > > proportion > > (maybe 5%) of

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Dr NoName
> the seqscan is cheaper when a large enough > proportion > (maybe 5%) of rows are retrieved, and indeed the > cost > is estimated at 39014 very good explanation. thank you. > try to increase statistics for this column: > > ALTER TABLE render ALTER COLUMN person_id > SET STATISTICS 1000; > AN

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Ragnar Hafstað
On Tue, 2005-08-02 at 10:50 -0700, Dr NoName wrote: > > What is the output of these: > > > > set enable_seqscan = off; > > explain SELECT render.* FROM render WHERE person_id > > = 432; > > > QUERY PLAN >

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Madison Kelly
This is really the only thing I can think to suggest; Have you tried 'SET enable_seqscan TO OFF;' and then tried the query again? This happens to me now and then where an index is a lot faster but the planner just doesn't want to use it. I've got an option in my code to turn off 'enable_seqsca

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Dr NoName
> What is the output of these: > > set enable_seqscan = off; > explain SELECT render.* FROM render WHERE person_id > = 432; QUERY PLAN --

Re: [GENERAL] indexes are fucked

2005-08-02 Thread Ragnar Hafstað
On Tue, 2005-08-02 at 10:04 -0700, Dr NoName wrote: > I got another problem with postgres. This time it > refuses to use the indexes. Check this out: [snip] > siam_production=> explain SELECT render.* FROM render > WHERE person_id = 432; >QUERY PLAN >

[GENERAL] indexes are fucked

2005-08-02 Thread Dr NoName
Hi all, I got another problem with postgres. This time it refuses to use the indexes. Check this out: siam_production=> \d render Table "public.render" Column|Type | Modifiers --