Re: [HACKERS] indexes and floats

From: "Thomas G(dot) Lockhart" <lockhart(at)alumni(dot)caltech(dot)edu>
To: Vince Vielhaber <vev(at)michvhf(dot)com>
Cc: "[hackers]"(at)paprika(dot)michvhf(dot)com, hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] indexes and floats
Date: 1998-08-03 05:16:01
Message-ID: 35C54791.CCAEFDE9@alumni.caltech.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> Is this a bug that the index doesn't work on floats or is it a
> datatype mismatch thing?
> Seq Scan on foo (cost=0.00 size=0 width=8)

Likely neither. Notice the cost of a sequential scan; it is zero. Why
bother doing an index scan?

You need at least two more things to happen to provoke Postgres into
using your index:

1) Have more entries in the table; rule of thumb is O(100) before an
index will be used.

2) Run vacuum after getting that many entries to make sure the optimizer
will know about the configuration of the tables and indices.

Good luck.

- Tom

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas G. Lockhart 1998-08-03 05:25:20 Re: [HACKERS] TODO item: make pg_shadow updates more robust
Previous Message Vadim Mikheev 1998-08-03 02:38:03 Re: [HACKERS] OR with multi-key indexes