Re: Strange Index behavior - Mailing list pgsql-general

From Együd Csaba (Freemail)
Subject Re: Strange Index behavior
Date
Msg-id 0I9400GDXX99TI@mail.vnet.hu
Whole thread Raw
In response to Re: Strange Index behavior  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Strange Index behavior
Re: Strange Index behavior
List pgsql-general
But why? I thought the planner is for choose the quicker way to the target
point. If there is an index which is probably would speed up the query then
why does the planner ignore that?

The difference between the result times is 16x. I can't understand why the
planner thinks it is the better way...

-- Csaba

-----Original Message-----
From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: Wednesday, December 22, 2004 6:34 PM
To: Együd Csaba (Freemail)
Cc: 'Együd Csaba'; pgsql-general@postgresql.org
Subject: Re: [GENERAL] Strange Index behavior

=?iso-8859-2?Q?Egy=FCd_Csaba_=28Freemail=29?= <csegyud@freemail.hu> writes:
> The point is that there are cases where a primary key index is not
> used - even if the condition is formaly good.

You haven't actually shown us such a case.  In the case you gave, I think
the planner probably made the right choice not to use the index.

            regards, tom lane



--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 2004.12.21.


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 2004.12.21.


--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 2004.12.21.




--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.6.3 - Release Date: 2004.12.21.


pgsql-general by date:

Previous
From: Lonni J Friedman
Date:
Subject: Re: What HW / OS is recommeded
Next
From: Tom Lane
Date:
Subject: Re: 8.0 Beta3 worked, RC1 didn't!