| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Peter Keller <peter(dot)keller(at)bvv(dot)bayern(dot)de> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: Problems with genetic optimizer |
| Date: | 2000-10-24 23:26:43 |
| Message-ID: | 26614.972430003@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
Peter Keller <peter(dot)keller(at)bvv(dot)bayern(dot)de> writes:
> I generated a table with a column type 'box', inserted some values and
> created an index (ops_box) on that column, run a vacuum and looked with
> the command EXPLAIN if the select will use the index.
> And the result was very astonishing:
> if I had inserted 120000 elements postgres will _NOT_ use the index, if
> I had inserted 100000 elements postgres will use the index!
Hmm. The system's knowledge of selectivities for R-tree indexes is
essentially nil; perhaps someone will be motivated to improve that
someday. In the meantime, the entirely bogus numbers returned by
src/backend/utils/adt/geo_selfuncs.c are supposed to be small enough
to ensure that R-trees are used if available. What was your test
query exactly, and what do you get from EXPLAIN with and without
forcing enable_seqscan off?
regards, tom lane
| From | Date | Subject | |
|---|---|---|---|
| Next Message | K Parker | 2000-10-25 00:00:22 | Re: phpPgAdmin |
| Previous Message | Tom Lane | 2000-10-24 23:12:42 | Re: How do I find out the version number |