From: | Manuel Fernando Aller <manuel(dot)aller(at)gmail(dot)com> |
---|---|
To: | Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> |
Cc: | POSTGRESQL - Ayuda <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: pregunta sobre particionado |
Date: | 2010-04-16 19:37:12 |
Message-ID: | 1271446632.12199.26.camel@manolo-notebd |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
El vie, 16-04-2010 a las 14:04 -0500, Jaime Casanova escribió:
> 2010/4/16 Manuel Fernando Aller <manuel(dot)aller(at)gmail(dot)com>:
> >
> > Qué olvidé considerar?
> >
>
> imagino que hiciste un ANALYZE en las dos bases luego de crear los
> indices, verdad?
Le hice analyze, si.
> puedes mostrar ambos planes de ejecución? que versión de postgres es esta?
plan 'partido':
QUERY
PLAN
----------------------------------------------------------------------------------------------------------------------
Limit (cost=196553.64..196553.65 rows=3 width=830)
-> Sort (cost=196553.64..208783.60 rows=4891984 width=830)
Sort Key: public.maestra.maestra_timestamp
-> Result (cost=0.00..133325.66 rows=4891984 width=830)
-> Append (cost=0.00..133325.66 rows=4891984 width=830)
-> Seq Scan on maestra (cost=0.00..11.12 rows=30 width=830)
Filter: (maestra_timestamp >= '2010-03-01
00:22:00'::timestamp without time zone)
-> Seq Scan on maestra201003 maestra (cost=0.00..84760.52
rows=3109091 width=89)
Filter: (maestra_timestamp >= '2010-03-01
00:22:00'::timestamp without time zone)
-> Seq Scan on maestra201004 maestra (cost=0.00..48554.01
rows=1782863 width=89)
Filter: (maestra_timestamp >= '2010-03-01
00:22:00'::timestamp without time zone)
(11 filas)
el plan de la original:
QUERY
PLAN
------------------------------------------------------------------------------------------------------------
Limit (cost=0.00..0.13 rows=3 width=88)
-> Index Scan using ix_maestra_timestamp on maestra
(cost=0.00..142343.22 rows=3314407 width=88)
Index Cond: (maestra_timestamp >= '2010-03-01
00:22:00'::timestamp without time zone)
(3 filas)
ahora, mirando esto, pregunto, por qué no quiere usar los índices en el
esquema particionado?
la versión de postgres es la 8.3, instalada de rpm:
[root(at)battlecat ~]# rpm -qa |grep postg
postgresql-libs-8.3.9-1PGDG.rhel5
postgresql-contrib-8.3.9-1PGDG.rhel5
postgresql-8.3.9-1PGDG.rhel5
postgresql-devel-8.3.9-1PGDG.rhel5
postgresql-server-8.3.9-1PGDG.rhel5
--
Manuel Fernando Aller <manuel(dot)aller(at)gmail(dot)com>
From | Date | Subject | |
---|---|---|---|
Next Message | Manuel Fernando Aller | 2010-04-16 19:46:53 | Re: pregunta sobre particionado |
Previous Message | Sergio Valdes Hurtado | 2010-04-16 19:21:48 | Re: Suma de Campos |