From: | MIGUEL CANCHAS <mcanchas(at)tsr(dot)com(dot)pe> |
---|---|
To: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Esta bien ? |
Date: | 2007-10-06 15:06:37 |
Message-ID: | 410117BB01F4D611B73A00010331DD2403B58165@tsnt.tsr.com.pe |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Cuando consulto por un campo, bien .
Pero si consulto por 2 o mas campos, como deberia ser mi instrucción y mis
indices ?
Por ejemplo yo uso esto :
Sele position, ficha, longitud, idservicio from hilados where ficha = nFicha
-- esto lo hace bien y rapido
tengo un indice por ficha
Sele position, ficha, longitud, idservicio from hilados where ficha = nFicha
and position = nPosi --- esto lo hace lento
tengo un indice por ficha
tengo un indice por position
y tambien tengo un indice donde lo cree asi
CREATE INDEX "ficha_hilados_idx4" ON "public"."hilados"
USING btree ("idficha", "position");
aun asi me parece lento , esta bien asi ?
use postgresql 8.0 sobre win xp sp2
Gracias
Miguel
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2007-10-06 15:13:03 | Re: Esta bien ? |
Previous Message | Alvaro Herrera | 2007-10-06 14:51:43 | Re: [Fwd: Off Topic Java con postgres] |