Skip site navigation (1) Skip section navigation (2)

Re: What is the best way to optimize the query.

From: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
To: Srikanth <srikanth(at)inventum(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: What is the best way to optimize the query.
Date: 2010-07-19 06:08:43
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
On 17/07/10 16:50, Srikanth wrote:
> I am sending u the query along with execution plan. Please help
> explain analyze select
> s.*,a.actid,,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=273
> order by d.domname,s.expirydt,a.actname

Lots of those names in the join list are views, aren't they?

I doubt anyone can help you unless you show the definition of your views
and the schema of your tables.

Also, consider attaching the EXPLAIN ANALYZE output as a text
attachment, as your mail client is "helpfully" rewrapping it into
unintelligible gibberish.

Craig Ringer

In response to

pgsql-performance by date

Next:From: kuopoDate: 2010-07-19 06:27:51
Subject: how to handle a big table for data log
Previous:From: Sergey KonoplevDate: 2010-07-19 06:07:26
Subject: Re: What is the best way to optimize the query.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group