Este es el resultado del explain analyze en el server 1:
QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Sort (cost=1718.18..1718.21 rows=57 width=519) (actual time=175459.691..175463.798 rows=2865 loops=1) Sort Key: public.datosentrada_his.fechacreacion Sort Method: quicksort Memory: 446kB -> Hash Left Join (cost=16.76..1717.85 rows=57 width=519) (actual time=81664.931..175446.958 rows=2865 loops=1) Hash Cond: (public.datosentrada_his.importacionid = em.importacionid) -> Nested Loop Left Join (cost=0.00..1700.63 rows=11 width=495) (actual time=81664.848..175435.842 rows=2865 loops=1) -> Nested Loop Left Join (cost=0.00..1660.14 rows=5 width=254) (actual time=81618.484..175341.231 rows=2865 loops=1) Join Filter: (ea.tipo = te.tipo) -> Nested Loop Left Join (cost=0.00..1654.23 rows=5 width=76) (actual time=81605.823..175048.216 rows=2865 loops=1) -> Append (cost=0.00..1621.58 rows=4 width=58) (actual time=81551.393..174852.044 rows=2865 loops=1) -> Index Scan using fki_vehiculo_his on datosentrada_his (cost=0.00..1621.58 rows=4 width=58) (actual time=81551.387..174843.074 rows=2865 loops=1) Index Cond: (((unitno)::text = '142'::text) AND ((flota)::text = 'Transportes Bueno'::text)) Filter: ((fechacreacion >= '2011-07-13 05:00:00'::timestamp without time zone) AND (fechacreacion <= '2011-07-15 04:59:00'::timestamp without time zone)) -> Index Scan using ea_importacionid on entradaalarma ea (cost=0.00..8.16 rows=1 width=26) (actual time=0.063..0.063 rows=0 loops=2865) Index Cond: (public.datosentrada_his.importacionid = ea.importacionid) -> Seq Scan on tipoevento te (cost=0.00..1.08 rows=28 width=186) (actual time=0.008..0.050 rows=28 loops=2865) -> Index Scan using imid on entradafallas ef (cost=0.00..8.09 rows=2 width=249) (actual time=0.028..0.028 rows=0 loops=2865) Index Cond: (public.datosentrada_his.importacionid = ef.importacionid) -> Hash (cost=13.12..13.12 rows=1040 width=40) (actual time=0.006..0.006 rows=0 loops=1) -> Seq Scan on entradamensajes em (cost=0.00..13.12 rows=1040 width=40) (actual time=0.002..0.002 rows=0 loops=1) Total runtime: 175468.194 ms (21 rows) y Este es el del server 2 QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Sort (cost=4650.54..4650.64 rows=190 width=519) (actual time=5074.391..5078.896 rows=2865 loops=1) Sort Key: public.datosentrada_his.fechacreacion Sort Method: quicksort Memory: 446kB -> Hash Left Join (cost=4347.73..4649.11 rows=190 width=519) (actual time=922.145..5062.929 rows=2865 loops=1) Hash Cond: (public.datosentrada_his.importacionid = em.importacionid) -> Nested Loop Left Join (cost=4330.97..4630.83 rows=36 width=495) (actual time=922.101..5052.662 rows=2865 loops=1) -> Hash Left Join (cost=4330.97..4501.28 rows=16 width=254) (actual time=877.626..4979.360 rows=2865 loops=1) Hash Cond: (ea.tipo = te.tipo) -> Nested Loop Left Join (cost=4329.79..4500.04 rows=16 width=76) (actual time=877.411..4968.538 rows=2865 loops=1) -> Append (cost=4329.79..4385.75 rows=14 width=58) (actual time=828.176..4757.065 rows=2865 loops=1) -> Bitmap Heap Scan on datosentrada_his (cost=4329.79..4385.75 rows=14 width=58) (actual time=828.171..4748.222 rows=2865 loops=1) Recheck Cond: (((unitno)::text = '142'::text) AND ((flota)::text = 'Transportes Bueno'::text) AND (fechacreacion >= '2011-07-13 05:00:00'::timestamp without time zone) AND (fechacreacion <= '2011-07-15 04:59:00'::timestamp without time zone)) -> BitmapAnd (cost=4329.79..4329.79 rows=14 width=0) (actual time=802.119..802.119 rows=0 loops=1) -> Bitmap Index Scan on fki_vehiculo_his (cost=0.00..31.70 rows=1496 width=0) (actual time=390.128..390.128 rows=224090 loops=1) Index Cond: (((unitno)::text = '142'::text) AND ((flota)::text = 'Transportes Bueno'::text)) -> Bitmap Index Scan on ind_fecha (cost=0.00..4298.04 rows=331110 width=0) (actual time=376.891..376.891 rows=334068 loops=1) Index Cond: ((fechacreacion >= '2011-07-13 05:00:00'::timestamp without time zone) AND (fechacreacion <= '2011-07-15 04:59:00'::timestamp without time zone)) -> Index Scan using ea_importacionid on entradaalarma ea (cost=0.00..8.16 rows=1 width=26) (actual time=0.068..0.068 rows=0 loops=2865) Index Cond: (public.datosentrada_his.importacionid = ea.importacionid) -> Hash (cost=1.08..1.08 rows=28 width=186) (actual time=0.141..0.141 rows=28 loops=1) -> Seq Scan on tipoevento te (cost=0.00..1.08 rows=28 width=186) (actual time=0.024..0.075 rows=28 loops=1) -> Index Scan using imid on entradafallas ef (cost=0.00..8.09 rows=2 width=249) (actual time=0.020..0.020 rows=0 loops=2865) Index Cond: (public.datosentrada_his.importacionid = ef.importacionid) -> Hash (cost=13.12..13.12 rows=1040 width=40) (actual time=0.008..0.008 rows=0 loops=1) -> Seq Scan on entradamensajes em (cost=0.00..13.12 rows=1040 width=40) (actual time=0.003..0.003 rows=0 loops=1) Total runtime: 5084.073 ms (26 rows) Alvaro como comentaba en mi primer correo las 2 db son identicas en estructura ( revisado varias veces por 2 personas diferentes ), en cuanto a la seccion que comentas tienes razon... esa es la seccion en la que me debo enfocar... les mando el caso completo para que no falte informacion. y si la columna fechacreacion si es timestamp without time zone. Juan no es linux :( y el raid es por Hardware, por lo tanto no puedo checar el estado con comandos... ya le pedi al centro de datos que cheque eso, pero como escribi en el correo anterior ya lo probe en un server alternativo y el resultado es el mismo por lo que descarto configuracion de postgres o configuracion de hardware. Saludos y muchas gracias por las respuestas. Roberto Campos - Enviado a la lista de correo pgsql-es-ayuda (pgsql-es-ayuda@postgresql.org) Para cambiar tu suscripción: http://www.postgresql.org/mailpref/pgsql-es-ayuda