From: | "Luz Lopez" <viaris(at)hotmail(dot)com> |
---|---|
To: | lists(at)natserv(dot)com |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: Query very slow |
Date: | 2001-11-12 15:28:49 |
Message-ID: | F197j53XaDFuXCpU6q500006e7b@hotmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Sorry I forgot to show the tables and indexes.
Table1 table2
=====================================
fil int fil int
tipo int codigo int
column1 int descripcion vachar(120)
column2 int descripcion1 varchar(120)
column3 int
column4 int
column5 int
column6 int
The indexes is for table1 tabl_idx1(fil,tipo), tab1_idx2(fil) for table2 is
tab2_idx1(fil), tab2_idx2(fil,codigo)
Thanks in advanced,
Regards,
> > I have a query that the excution es very slow, my query is:
> >
> > "select count(B.fil) as juntas,
> sum(C.column1),sum(C.column2),
> sum(C.column3),sum(C.column4),
> 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.
>
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
From | Date | Subject | |
---|---|---|---|
Next Message | amp | 2001-11-12 16:04:54 | |
Previous Message | Honza Rudovsky | 2001-11-12 15:22:48 | PLPGSQL Installation |