"Guillaume Smet" <[EMAIL PROTECTED]> writes:
> Isn't there any way to make PostgreSQL have a better estimation here:
> -> Index Scan using models_brands_brand on models_brands
> (cost=0.00..216410.97 rows=92372 width=0) (actual time=0.008..0.008
> rows=0 loops=303)
>Index Cond: (brand
Tom,
On 7/21/06, Tom Lane <[EMAIL PROTECTED]> wrote:
It's really not possible for a full-table indexscan to be faster than a
seqscan, and not very credible for it even to be approximately as fast.
I suspect your second query here is the beneficiary of the first query
having fetched all the pages
"Kevin McArthur" <[EMAIL PROTECTED]> writes:
> -> Seq Scan on models_brands (cost=0.00..6411.89 rows=369489
> width=4) (actual time=0.040..1352.997 rows=369489 loops=1)
> ...
>-> Index Scan using models_brands_brand on models_brands
> (cost=0.00..862236.96 rows=369489 width=4) (a
I discussed this with a few members of #postgresql
freenode this morning. I'll keep it breif; [note: i have cleaned out columns not
relevant]
I have two tables, brands and models_brands. The
first has about 300 records, the later about 350,000 records. The number of
distinct brands in the