Excerpts from motum hesa's message of mar ago 30 15:38:38 -0300 2011:

Hmm,

> Server1

>          ->  Index Scan using fki_vehiculo_his on datosentrada_his
> (cost=0.00..697.42 rows=2 width=600) (actual
> time=80568.991..173356.094 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))


> server2

>                      ->  Bitmap Index Scan on fki_vehiculo_his
> (cost=0.00..31.70 rows=1496 width=0) (actual time=364.576..364.576
> 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=490.006..490.006
> 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))

¿Qué pasa si le das un SET enable_seqscan TO off en el server 1?
Debería cambiar al segundo plan.  Si es así, creo que lo que deberías
hacer es

1. incrementar effective_cache_size
2. incrementar cpu_tuple_cost y/o cpu_operator_cost

-- 
Álvaro Herrera <alvhe...@alvh.no-ip.org>
-
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

Responder a