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

From Merlin Moncure
Subject Re: Slow running query with views...how to increase efficiency? with index?
Date
Msg-id b42b73150910271618xf89e346ucc17b45397223de7@mail.gmail.com
Whole thread Raw
In response to Slow running query with views...how to increase efficiency? with index?  (fox7 <ale_shark7@yahoo.it>)
Responses Re: Slow running query with views...how to increase efficiency? with index?
List pgsql-general
On Tue, Oct 27, 2009 at 5:11 PM, fox7 <ale_shark7@yahoo.it> wrote:
>
> Hi,
> I'm a new user...
> First of all excuse me for the bad english... :confused:
> I have a great problem!
> I have to do some little query with views, but the views contain thousand
> and thousand of records.
> Searching online I have found somthing about view index, but I don't know
> the right syntax for PostgreSQL.
> I have tries this:
> CREATE INDEX View1_index
>  ON View1
>  USING btree
>  (term1);

Views do not help or hurt performance.  Views encapsulate complex queries.

If you have a slow running query, the usual way to get help is to post:
*) explain analyze results (most important)
*) the query (important)
*) interesting tables/indexes (somewhat important)

merlin

pgsql-general by date:

Previous
From: Scott Bailey
Date:
Subject: Re: how to identify outliers
Next
From: Alvaro Herrera
Date:
Subject: Re: auto truncate/vacuum full