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/