Re: Perfrmance Problems (7.4.6)

From: "Doron Baranes" <doron(dot)baranes(at)dbnet(dot)co(dot)il>
To: "Ruben Rubio Rey" <ruben(at)rentalia(dot)com>, <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Perfrmance Problems (7.4.6)
Date: 2006-04-20 12:57:50
Message-ID: 0BA77301DFF4B24C9C5DAA74138BF95001E23C@exchange-1.dbnet.co.il
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Ok. But that means I need a trigger on the original column to update the
new column on each insert/update and that overhead.

-----Original Message-----
From: Ruben Rubio Rey [mailto:ruben(at)rentalia(dot)com]
Sent: Thursday, April 20, 2006 12:49 PM
To: Doron Baranes; pgsql-performance(at)postgresql(dot)org
Subject: Re: [PERFORM] Perfrmance Problems (7.4.6)

I think that the problem is the GROUP BY (datetime) that is
date_trunc('hour'::text, i.entry_time)
You should create an indexe with this expression (if its possible).

http://www.postgresql.org/docs/7.4/interactive/indexes-expressional.html

If is not possible, I would create a column with value
date_trunc('hour'::text, i.entry_time) of each row and then index it.

Hope this helps :)

Doron Baranes wrote:

>Hi,
>
>I am running on postgres 7.4.6.
>I did a vacuum analyze on the database but there was no change.
>I Attached here a file with details about the tables, the queries and
>the Explain analyze plans.
>Hope this can be helpful to analyze my problem
>
>10x
>Doron
>
>
>-----------------------------------------------------------------------
-
>
>
>---------------------------(end of
broadcast)---------------------------
>TIP 9: In versions below 8.0, the planner will ignore your desire to
> choose an index scan if your joining column's datatypes do not
> match
>
>

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Simon Dale 2006-04-20 13:18:58 Quick Performance Poll
Previous Message Ruben Rubio Rey 2006-04-20 10:48:38 Re: Perfrmance Problems (7.4.6)