From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Daniel Kalchev <daniel(at)digsys(dot)bg> |
Cc: | pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: 7.1.3 not using index |
Date: | 2001-12-03 17:34:43 |
Message-ID: | 14769.1007400883@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Daniel Kalchev <daniel(at)digsys(dot)bg> writes:
> (table has ~30k rows)
> EXPLAIN SELECT * FROM r where d = 8;
> The result is
> NOTICE: QUERY PLAN:
> Seq Scan on r (cost=0.00...3041.13 rows=7191 width=4)
Seqscan is the right plan to retrieve 7k rows out of a 30k table.
So the question is whether that estimate is in the right ballpark
or not. How many rows are there really with d=8? If it's way off,
what do you get from
select attname,attdispersion,s.*
from pg_statistic s, pg_attribute a, pg_class c
where starelid = c.oid and attrelid = c.oid and staattnum = attnum
and relname = 'r';
regards, tom lane
From | Date | Subject | |
---|---|---|---|
Next Message | Thomas Lockhart | 2001-12-03 17:42:51 | Re: Second call for platform testing |
Previous Message | Thomas Lockhart | 2001-12-03 17:14:21 | Re: Second call for platform testing |