Skip site navigation (1) Skip section navigation (2)

Re: Why Index is not working on date columns.

From: Kishore B <kishorebh(at)gmail(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Why Index is not working on date columns.
Date: 2005-10-25 15:04:21
Message-ID: 42567e060510250804y3329c901l21770d887dfcde42@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
Hi Tom,
 Thank you for your response.

> I surmise that you are testing on toy tables and extrapolating to what
> will happen on larger tables.
>
These tables participating here contain more than 8 million records as of
now, and on every day, 200K records, will add to them.
  Thank you,
Kishore.


 On 10/25/05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Kishore B <kishorebh(at)gmail(dot)com> writes:
> > Can you guys please take a look at the following query and let me know
> why
> > the index is not considered in the plan?
>
> "Considered" and "used" are two different things.
>
> The two examples you give have the same estimated cost (within two
> decimal places) so the planner sees no particular reason to choose one
> over the other.
>
> I surmise that you are testing on toy tables and extrapolating to what
> will happen on larger tables. This is an unjustified assumption.
> Create a realistic test data set, ANALYZE it, and then see if the
> planner chooses indexes you like.
>
> regards, tom lane
>

In response to

Responses

pgsql-performance by date

Next:From: Rodrigo MaderaDate: 2005-10-25 16:03:19
Subject: Re: Inefficient escape codes.
Previous:From: Tom LaneDate: 2005-10-25 14:27:08
Subject: Re: Reindex - Is this necessary after a vacuum?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group