Skip site navigation (1) Skip section navigation (2)

indices

From: "Sandrigo L(dot)Jara" <sandrigo(dot)lezcano(at)gmail(dot)com>
To: pgsql-es-ayuda(at)postgresql(dot)org
Subject: indices
Date: 2008-06-30 00:37:10
Message-ID: 1a5d58e60806291737q6bcf1d7cn3ad03336b82184f9@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-es-ayuda
 migre 22 millones de registros en una tabla en PostgreSQL 8.2
ddds, numeros..etc   ..ddds del tipo: character varying(3)
que quando ejecuto:

-- sin indices
-- Executing query:
SELECT ddd, count(ddd) AS cantidad FROM tabla GROUP BY 1 ORDER BY 1
Total query runtime: 432421 ms.
65 rows retrieved.

-- Executing query:
CREATE INDEX tabla_idx_ddd ON tabla (ddd)
Query returned successfully with no result in 496755 ms.

nuevamente ahora ya con indice...

-- Executing query:
SELECT ddd, count(ddd) AS cantidad FROM tabla GROUP BY 1 ORDER BY 1
Total query runtime: 404579 ms.
65 rows retrieved.

deberia ser mucho!!!!   mas rapido.. no???
agradezco todas las sugerencias

Abrazos a todos

Responses

  • Re: indices at 2008-06-30 00:53:25 from Pablo Marrero

pgsql-es-ayuda by date

Next:From: Pablo MarreroDate: 2008-06-30 00:53:25
Subject: Re: indices
Previous:From: Juan Carlos Badillo GoyDate: 2008-06-30 00:24:42
Subject: Re: [OT] Cubanos en la lista

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group