Re: Indexes not working (bug in 7.0.2?)

From: Zeljko Trogrlic <zeljko(at)technologist(dot)com>
To: zlatko(at)iskon(dot)hr
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Indexes not working (bug in 7.0.2?)
Date: 2000-09-05 08:41:03
Message-ID: 4.1.20000905103858.00a108c0@pop.tel.hr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Manual says you should use it after initial data entry, after entering a
large amount of rows and periodically.

At 23:02 4.9.2000 , Zlatko Calusic wrote:
>Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
>
>> Zlatko Calusic <zlatko(at)iskon(dot)hr> writes:
>> > It is now NOT using the index, and I don't understand why? Queries are
>> > practically the same, tables are practically the same, why is postgres
>> > using indexes in the first case and not in the second?
>>
>> Because it has substantially different ideas about the sizes of the
>> two tables --- notice the different estimated row counts. If you
>> haven't "vacuum analyzed" these tables recently, do so to bring the
>> planner's statistics up-to-date, and then see what you get. You may
>> also care to read the user's manual chapter about EXPLAIN,
>> http://www.postgresql.org/users-lounge/docs/7.0/postgres/c4888.htm
>>
>
>Yes, thanks to all who helped. 'vacuum analyze' was the magical
>incantation that helped.
>
>I still have one uncertainty. Is it possible that after some time
>postgres once again decides not to use indices (assuming I haven't run
>'vacuum analyze' again)?
>
>--
>Zlatko

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Zeljko Trogrlic 2000-09-05 08:53:03 Re: Change to DatabaseMetaData.java for the jdbc2 driver (fwd)
Previous Message Hoosain Madhi 2000-09-05 08:26:43 VACUUM Error