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

Re: Query very slow

From: Francisco Reyes <lists(at)natserv(dot)com>
To: Luz Lopez <viaris(at)hotmail(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: Query very slow
Date: 2001-11-10 19:45:33
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
On Sat, 10 Nov 2001, Luz Lopez wrote:

> I have a query that the excution es very slow, my query is:
> "select count(B.fil) as juntas,
	sum(C.column5,sum(C.column6)from table1 B, table2 C
	where C.tipo=1 and B.codigo=15 and C.fil=B.fil"
> The main table have 37824 rows nad I have index for the two tables.
> How can I  to improve better execution time at this query?

How about if you show us the output from "explain".
Also you did not specify what you had the indexes on.
Which is the main table? You are using 3 tables on this query.

In response to

pgsql-novice by date

Next:From: Francisco ReyesDate: 2001-11-10 20:18:57
Subject: Re: SQL Question
Previous:From: Francisco ReyesDate: 2001-11-10 19:42:42
Subject: Re: SQL Question

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