Re: What is the best way to optimize this query

From: Rajesh Kumar Mallah <mallah(dot)rajesh(at)gmail(dot)com>
To: Srikanth Kata <srikanth(at)inventum(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: What is the best way to optimize this query
Date: 2010-07-01 12:40:18
Message-ID: AANLkTikcn0kvdnhlsHAjyHWUdgYMAgbuOQaJ5b7tcodG@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Dear Sri,

Please post at least the Explain Analyze output . There is a nice posting
guideline
also regarding on how to post query optimization questions.

http://wiki.postgresql.org/wiki/SlowQueryQuestions

On Thu, Jul 1, 2010 at 10:49 AM, Srikanth Kata <srikanth(at)inventum(dot)net>wrote:

>
> Please tell me What is the best way to optimize this query
>
> select
> s.*,a.actid,a.phone,d.domid,d.domname,d.domno,a.actno,a.actname,p.descr
> as svcdescr from vwsubsmin s inner join packages p on s.svcno=p.pkgno inner
> join
> account a on a.actno=s.actno inner join ssgdom d on a.domno=d.domno inner
> join (select subsno from
> getexpiringsubs($1,cast($2 as integer),cast($3 as double precision), $4) as
> (subsno int,expirydt timestamp without time zone,balcpt double precision))
> as e on s.subsno=e.subsno where s.status <=15 and d.domno=$5 order by
> d.domname,s.expirydt,a.actname
> --
> View this message in context:
> http://old.nabble.com/What-is-the-best-way-to-optimize-this-query-tp29041515p29041515.html
> Sent from the PostgreSQL - performance mailing list archive at Nabble.com.
>
>
> --
> Sent via pgsql-performance mailing list (pgsql-performance(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-performance
>

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Thom Brown 2010-07-01 12:51:24 Re: What is the best way to optimize this query
Previous Message Greg Smith 2010-07-01 10:00:01 Re: PostgreSQL as a local in-memory cache