From: Helio Campos Mello de Andrade <helio.campos@gmail.com>
To: Віталій Тимчишин <tivv00@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL OR performance
Date: Thu, 6 Nov 2008 14:44:18 -0200
Message-ID: <29e3942f0811060844y5e473a95yb0e7eb2c0696d821@mail.gmail.com> (raw)
In-Reply-To: <331e40660811060833l49bf837em41ca88d4b2061ea1@mail.gmail.com>
References: <331e40660811050312u552cab53ifa88e493e1c4f7ac@mail.gmail.com>
<1225902700.1432.53.camel@jdavis>
<331e40660811060246m51df553egd4e2ba91f08d1434@mail.gmail.com>
<29e3942f0811060426k5fe34b1av401a2dba62e4ae3c@mail.gmail.com>
<331e40660811060833l49bf837em41ca88d4b2061ea1@mail.gmail.com>
As far as i know if you created the indexes properly and postgres sees that
it will give some improvement he will use those.
- Look at the page of index creation that we may be forgeting some thing.
http://www.postgresql.org/docs/8.3/static/indexes.html
I have to go to the hospital know. Tomorrow i will take a look at the manual
and try to understand all the necessary for the postgresql use an index.
Regards
On Thu, Nov 6, 2008 at 2:33 PM, Віталій Тимчишин <tivv00@gmail.com> wrote:
>
>
> 2008/11/6 Helio Campos Mello de Andrade <helio.campos@gmail.com>
>
>> For what i see in four OR-plan.txt tou are doing too much "sequencial
>> scan" . Create some indexes for those tables using the fields that you use
>> an it may help you.
>>
>> OBS: If you already have lots of indexes in your tables it may be a good
>> time for you re-think your strategy because it´s ot working.
>> Tips:
>> 1 - create indexes for the tables with the fields that you will use in
>> the query if it is your most important query. If you have others querys that
>> are used please post those here and we can help you to desing a better plan.
>
>
> As you can see from other plans, it do have all the indexes to perform it's
> work fast (when given part by part). It simply do not wish to use them. My
> question: Is this a configuration problem or postgresql optimizer simply
> can't do such a query rewrite?
>
> Actually I did rewrite the query to work properly as you can see from
> union-plan.txt. My question is if postgresql can do this automatically
> because such a rewrite is not always easy/possible (esp. for generated
> queries)?
>
>
--
Helio Campos Mello de Andrade
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: helio.campos@gmail.com, tivv00@gmail.com
Subject: Re: PostgreSQL OR performance
In-Reply-To: <29e3942f0811060844y5e473a95yb0e7eb2c0696d821@mail.gmail.com>
References: <331e40660811050312u552cab53ifa88e493e1c4f7ac@mail.gmail.com> <1225902700.1432.53.camel@jdavis> <331e40660811060246m51df553egd4e2ba91f08d1434@mail.gmail.com> <29e3942f0811060426k5fe34b1av401a2dba62e4ae3c@mail.gmail.com> <331e40660811060833l49bf837em41ca88d4b2061ea1@mail.gmail.com> <29e3942f0811060844y5e473a95yb0e7eb2c0696d821@mail.gmail.com>
* 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