Skip site navigation (1) Skip section navigation (2)

Performance on views

From: Rickard Sjöström <rickard(dot)sjostrom(at)bluebottle(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Performance on views
Date: 2007-03-30 11:19:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
I've probably missed somthing but here is my problem.

I have a view that is really slow and I ca easily work around the slowness by bypassing the view and query the real table directly.

>From view, the slow one:
SELECT * from my_view WHERE date > 2007-03-01

and to speed it up I just copy the view defintion and inserts some "date > ...", like this.

FROM (select * from my_table where data > 2007-03-01) mt,
         my JOIN someother on

The thing here is that I limit the query before joining with other data.

Did I get through with my problem?
Any ideas how I can speed up my views?
Is there something I can tell the database in order to speed up?
Is this a known issue with views?


Click to lower your debt and consolidate your monthly expenses


pgsql-admin by date

Next:From: Sorin N. CiolofanDate: 2007-03-30 13:20:09
Subject: Re: ERROR: out of shared memory
Previous:From: Simon RiggsDate: 2007-03-30 11:16:34
Subject: Re: trying to run PITR recovery

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group