Re: Odpověď: Re: backend don't use index whenquerying by indexed column - Mailing list pgsql-bugs

From Tom Lane
Subject Re: Odpověď: Re: backend don't use index whenquerying by indexed column
Date
Msg-id 29211.997191204@sss.pgh.pa.us
Whole thread Raw
List pgsql-bugs
<zhabala@telecom.cz> writes:
> first of all thank You for Your response. But here is the
> reality. Table formula have about 450000 rows at this time.
> The id_formula column is int4 defined as not null primary key.

It is eh?  Have you done a VACUUM ANALYZE on this table lately?
4500 rows (1%) would be the default match estimate in the absence of
any statistics.

> And the index have clause unique, but backend still don't use it.

7.2 will know enough to realize that presence of a unique index means
the column is unique, but existing releases only look at the VACUUM
ANALYZE statistics.  No statistics = bad plan.

            regards, tom lane


pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: backend don't use index when querying by indexed column
Next
From: Trevin Chow
Date:
Subject: v7.0.2: can't use 'EXTRACT(EPOCH FROM'