Re: [PERFORM] What is the best way to optimize the query.

2010-07-27 Thread Robert Haas
On Sat, Jul 17, 2010 at 4:50 AM, Srikanth wrote: > I am sending u the query along with execution plan. Please help Looks to me like your biggest problem is right here: "-> Seq Scan on subs s (cost=0.00..5599.42 rows=58313 width=69) (actua

Re: [PERFORM] What is the best way to optimize the query.

2010-07-18 Thread Craig Ringer
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,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

Re: [PERFORM] What is the best way to optimize the query.

2010-07-18 Thread Sergey Konoplev
Hello, On 17 July 2010 12:50, Srikanth wrote: > I am sending u the query along with execution plan. Please help > It would be better if you start with it: http://www.postgresql.org/docs/8.4/interactive/indexes.html http://www.mohawksoft.org/?q=node/56 -- Sergey Konoplev Blog: http://gray-he

[PERFORM] What is the best way to optimize the query.

2010-07-18 Thread Srikanth
I am sending u the query along with execution plan. Please help explain analyze 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.