From: | Figo's <figo_sistemas(at)yahoo(dot)es> |
---|---|
To: | Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql <pgsql-es-ayuda(at)postgresql(dot)org> |
Subject: | Re: - - Problema con ídices . |
Date: | 2006-02-20 17:54:17 |
Message-ID: | 20060220175417.83691.qmail@web86810.mail.ukl.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
Table "tsmtp.tbs_email_temporal"
Column | Type | Modifiers
------------------+------------------------+----------------------------------------------------------------------------
emte_codigo | integer | not null default nextval('tsmtp.tbs_email_temporal_emte_codigo_seq'::text)
emte_codemail | bigint | not null
emte_from | character varying(100) | not null
emte_codfuente | character varying(20) | not null
emte_tipoproceso | character varying(1) | not null
emte_status | character(1) | not null default 'N'::bpchar
Indexes: index_tbs_email_temporal_emte_codemail btree (emte_codemail),
index_tbs_email_temporal_emte_codigo btree (emte_codigo),
index_tbs_email_temporal_emte_status btree (emte_status)
La consulta:
explain select * from tsmtp.tbs_email_temporal where emte_status='N'
El Explain:
"Seq Scan on tbs_email_temporal (cost=0.00..24296.38 rows=524754 width=184)"
" Filter: (emte_status = 'N'::bpchar)"
Alvaro Herrera <alvherre(at)commandprompt(dot)com> escribió: Figo's escribió:
> No, infelizmente los indices para char, text y varchar no me están
> funcionando en la bd de producción, probé utilizando los índices con
> clase de operadores texa_pattern_ops, varchar_pattern_ops,
> bpchar_pattern_ops
(con like y con =) en la misma tabla y en
> otras y no funcionan, seguramente debo tener alguna variable seteada
> que impida la utilización de índices en campos alfanuméricos (esto
> es una suposición mía, no estoy seguro.)
Veamos la definicion de la tabla? Copia y pega un \d aca, y un EXPLAIN
de la consulta involucrada.
--
Alvaro Herrera http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
powered by Figo's
---------------------------------
LLama Gratis a cualquier PC del Mundo.
Llamadas a fijos y móviles desde 1 céntimo por minuto.
http://es.voice.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Espartano | 2006-02-20 18:19:46 | Re: Ayuda sobre fechas |
Previous Message | Kelly González Enríquez | 2006-02-20 17:49:18 | Ayuda sobre fechas |