Re: Help with a seq scan on multi-million row table - Mailing list pgsql-sql

From Markus Schaber
Subject Re: Help with a seq scan on multi-million row table
Date
Msg-id 44631313.1020100@logix-tt.com
Whole thread Raw
In response to Re: Help with a seq scan on multi-million row table  (<ogjunk-pgjedan@yahoo.com>)
Responses Re: Help with a seq scan on multi-million row table
Re: Help with a seq scan on multi-million row table
List pgsql-sql
Hi, Otis,

ogjunk-pgjedan@yahoo.com 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 down, please let me know.

Did you try to set higher statistics targets for this columns?

For experimenting, I'd try to set it to 100 or even higher, then ANALYZE
the table, and then retest the query.

HTH,
Marks

-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org


pgsql-sql by date:

Previous
From: Michael Glaesemann
Date:
Subject: Re: ORDER BY question
Next
From: Tom Lane
Date:
Subject: Re: Help with a seq scan on multi-million row table