pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adnan DURSUN <a_dursun@hotmail.com>
To: pgsql-performance@postgresql.org
Subject: Re: Why does not perform index combination
Date: Fri, 17 Feb 2006 00:14:56 +0200
Message-ID: <BAY106-DAV1859B44CE7651F57F20E10FAFB0@phx.gbl> (raw)

>From: Tom Lane
>Date: 02/16/06 19:29:21
>To: Adnan DURSUN
>Cc: pgsql-performance@postgresql.org
>Subject: Re: [PERFORM] Why does not perform index combination

>"Adnan DURSUN" <a_dursun@hotmail.com> writes:
>>   I have query for a report. Explain analyze result is below. The =
>> execution plan tells that it would use "t_koltuk_islem_pkey" index on =
>> table "t_koltuk_islem" to scan. However, there is another index on table =
>> "t_koltuk_islem" on column "islem_tarihi" that can be combined on plan. =
>> Why doesn't optimizer choice that ? It prefer to perform a filter on =
>> column "islem_tarihi" ... Why ?

>Probably thinks that the extra index doesn't add enough selectivity to
>be worth scanning.  It's probably right, too --- maybe with a narrower
>date range the answer would be different.

    Yes, a narrower date range solves that.. Thanks for your suggestions...

>I think the main problem in this plan is the poor estimation of the size
>of the d1/s join.  Are your stats up to date on those tables?  Maybe
>boosting the statistics target for one or both would help.

    Database was vacuumed and analyzed before got take the plan..

Regards
Adnan DURSUN

view thread (3+ messages)

Message-ID: <BAY106-DAV1859B44CE7651F57F20E10FAFB0@phx.gbl>
Permalink:  ../BAY106-DAV1859B44CE7651F57F20E10FAFB0@phx.gbl/
Also on:    postgresql.org/message-id/BAY106-DAV1859B44CE7651F57F20E10FAFB0@phx.gbl

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-performance@postgresql.org
  Cc: a_dursun@hotmail.com
  Subject: Re: Why does not perform index combination
  In-Reply-To: <BAY106-DAV1859B44CE7651F57F20E10FAFB0@phx.gbl>
  References: <BAY106-DAV1859B44CE7651F57F20E10FAFB0@phx.gbl>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox