From: | William Diaz Pabón <widipa(at)gmail(dot)com> |
---|---|
To: | PostgreSQL Español Ayuda <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | 8.4 index no funciona con 158 mil registros |
Date: | 2013-06-25 22:25:21 |
Message-ID: | CAGrLqMacox9WmYn3QHmHHCSdFYhkBY1byUNJCbHL5hSu=32qCA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Saludos lista.
Tengo esta BD
Version string PostgreSQL 8.4.17 on i686-pc-linux-gnu, compiled by GCC gcc
(GCC) 4.4.6 20120305 (Red Hat 4.4.6-4), 32-bit
Donde tengo una tabla con un campo estado que tiene esta constraint
CHECK (estado::text = 'ACTIVO'::text OR estado::text = 'INACTIVO'::text OR
estado::text = 'PAGADO'::text OR estado::text = 'CANJE'::text OR
estado::text = 'LIQUIDADO'::text OR estado::text = 'CONVENIO'::text OR
estado::text = 'REFINANCIADO'::text OR estado::text = 'PRESCRITO'::text),
cuando hago un select donde el where hace *estado = 'INACTIVO'* y hago un
explain query me indica que esta usando el indice.
pero cuando hago *estado = 'ACTIVO'* y hago un explain query me indica
que NO esta usando el indice. y me dice que hay 158 mil filas.
como se hace para que sin importar la cantidad de registros use siempre el
indice?
PD: Ya le hice un vacuum y nada.
--
Éxitos.
Cordialmente,
*William Diaz Pabón**,
Especialista en Soluciones Informáticas
* *
*
Bogotá, Colombia
Tel: +57 (300) 3917774
http://planetapleno.blogspot.com/
http://tutorialestecnicos.blogspot.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Rodrigo Gonzalez | 2013-06-25 22:48:11 | Re: 8.4 index no funciona con 158 mil registros |
Previous Message | Martín Marqués | 2013-06-23 18:03:20 | Re: Migracion de MySQL a Postgres |