Re: Slow running query with views...how to increase efficiency? with index? - Mailing list pgsql-general

From A. Kretschmer
Subject Re: Slow running query with views...how to increase efficiency? with index?
Date
Msg-id 20091028125643.GC31211@a-kretschmer.de
Whole thread Raw
In response to Re: Slow running query with views...how to increase efficiency? with index?  (fox7 <ale_shark7@yahoo.it>)
List 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

pgsql-general by date:

Previous
From: Alban Hertroys
Date:
Subject: Re: Slow running query with views...how to increase efficiency? with index?
Next
From: fox7
Date:
Subject: Re: Slow running query with views...how to increase efficiency? with index?