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

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: fox7 <ale_shark7(at)yahoo(dot)it>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Slow running query with views...how to increase efficiency? with index?
Date: 2009-10-27 23:18:22
Message-ID: b42b73150910271618xf89e346ucc17b45397223de7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Tue, Oct 27, 2009 at 5:11 PM, fox7 <ale_shark7(at)yahoo(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Alvaro Herrera 2009-10-27 23:29:39 Re: auto truncate/vacuum full
Previous Message Scott Bailey 2009-10-27 23:04:47 Re: how to identify outliers