Re: Slow query, where am I going wrong?

From: AndyG <andy(dot)gumbrecht(at)orprovision(dot)com>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Slow query, where am I going wrong?
Date: 2012-10-31 09:18:23
Message-ID: 1351675103112-5730140.post@n5.nabble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Albe Laurenz *EXTERN* wrote
> Increasing the statistics for test_result.id_recipe_version
> had no effect?
>
>> I am going to normalize the table some more before partitioning.
>
> How do you think that partitioning will help?

I increased the statistics in steps up to 5000 (with vacuum analyse) - Seems
to be as good as it gets.

http://explain.depesz.com/s/z2a

The simulated data is about a months worth. Partitioning is only really
expected to help on insert, but that's pretty critical for us.

At the moment test_item contains way too much repeated data IMHO, and I will
address that asap (is going to hurt ).

I will also look into creating an aggregate table to hold the 'distinct'
values.

Andy.

--
View this message in context: http://postgresql.1045698.n5.nabble.com/Slow-query-where-am-I-going-wrong-tp5730015p5730140.html
Sent from the PostgreSQL - performance mailing list archive at Nabble.com.

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Albe Laurenz 2012-10-31 09:35:54 Re: Slow query, where am I going wrong?
Previous Message Scott Marlowe 2012-10-30 22:16:25 Re: How to keep queries low latency as concurrency increases