From: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
---|---|
To: | motum hesa <motums(at)gmail(dot)com> |
Cc: | Lista PostgreSQL <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: Problema uso de indices... |
Date: | 2011-08-30 20:31:48 |
Message-ID: | 1314736102-sup-6682@alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
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 <alvherre(at)alvh(dot)no-ip(dot)org>
From | Date | Subject | |
---|---|---|---|
Next Message | Jose Guzman | 2011-08-30 21:37:17 | Como calificar dos tablas en postgres estando en bases de datos diferentes |
Previous Message | Alvaro Herrera | 2011-08-30 20:26:32 | Re: Cálculo de porciento SOLUCIONADO |