Re: Slow running query with views...how to increase efficiency? with index?

From: "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: Slow running query with views...how to increase efficiency? with index?
Date: 2009-10-28 12:56:43
Message-ID: 20091028125643.GC31211@a-kretschmer.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

In response to fox7 :
>
> What do you mean for analyze results?

Try "explain analyse select ..."

>
> I create views by means of jdbc...
> For example I have created V2TO as:
> CREATE VIEW v2TO AS (
> SELECT DISTINCT TO.term1, TO.term2
> FROM TO
> UNION
> SELECT TB.term2 AS term1, TB.term1 AS term2
> FROM TB;
> )

In your case: explain analyse select * from v2to where ...

Please read:
http://www.postgresql.org/docs/8.4/interactive/using-explain.html

Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47150, D1: 0160/7141639 (mehr: -> Header)
GnuPG: 0x31720C99, 1006 CCB4 A326 1D42 6431 2EB0 389D 1DC2 3172 0C99

In response to

Browse pgsql-general by date

  From Date Subject
Next Message fox7 2009-10-28 13:06:19 Re: Slow running query with views...how to increase efficiency? with index?
Previous Message Alban Hertroys 2009-10-28 12:55:53 Re: Slow running query with views...how to increase efficiency? with index?