From: | Gregory Stark <stark(at)enterprisedb(dot)com> |
---|---|
To: | André Volpato <andre(dot)volpato(at)ecomtecnologia(dot)com(dot)br> |
Cc: | <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Postgres not using array |
Date: | 2008-08-22 10:28:58 |
Message-ID: | 87myj5jqc5.fsf@oxford.xeocode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
André Volpato <andre(dot)volpato(at)ecomtecnologia(dot)com(dot)br> writes:
> Tom Lane escreveu:
>>> We are guessing that a dual core 3.0GHz will beat up a quad core 2.2,
>>> at least in this environmnent with less than 4 concurrent queryes.
>>
>> The most you could hope for from that is less than a 50% speedup. I'd
>> suggest investing some tuning effort first. Some rethinking of your
>> schema, for example, might buy you orders of magnitude ... with no new
>> hardware investment.
>
> I think we almost reached the tuning limit, without changing the schema.
It's hard to tell from the plan you posted (and with only a brief look) but it
looks to me like your query with that function is basically doing a join but
because the inner side of the join is in your function's index lookup it's
effectively forcing the use of a "nested loop" join. That's usually a good
choice for small queries against big tables but if you're joining a lot of
data there are other join types which are much faster. You might find the
planner can do a better job if you write your query as a plain SQL query and
let the optimizer figure out the best way instead of forcing its hand.
--
Gregory Stark
EnterpriseDB http://www.enterprisedb.com
Ask me about EnterpriseDB's On-Demand Production Tuning
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Schuller | 2008-08-22 11:52:44 | Identifying the nature of blocking I/O |
Previous Message | Peter Eisentraut | 2008-08-22 09:41:31 | Re: The state of PG replication in 2008/Q2? |