Re: Indices!

From: Mario <gonzalemario(at)gmail(dot)com>
To: "Sonia Malave" <smalave(at)hidrobolivar(dot)com(dot)ve>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: Indices!
Date: 2007-01-10 20:32:51
Message-ID: 2065a6cf0701101232v6e384ad2l3f4498573a8cadd@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On 10/01/07, Sonia Malave <smalave(at)hidrobolivar(dot)com(dot)ve> wrote:
> /*Buenas Tardes Lista:
>
> */Escribo para solicitar algun ejemplo de creación de índices en postgreSQL.

En realidad creo que ya has creado indices sin darte cuenta. Por
ejemplo, has creado llaves primarias?

test=> CREATE TABLE test (pk integer PRIMARY KEY);
LOG: sentencia: CREATE TABLE test (pk integer PRIMARY KEY);
NOTICE: CREATE TABLE / PRIMARY KEY creará el índice implícito
«test_pkey» para la tabla «test»
CREATE TABLE

Si te fijas, Postgres dice que creara un indice implicito para esa
columna. Si quieres crear otros tipos de indices para otras columas
debes hacerlo con CREATE INDEX. Te indico el link del manual

http://www.postgresql.org/docs/8.1/interactive/sql-createindex.html

>

--
http://www.advogato.org/person/mgonzalez/

In response to

  • Indices! at 2007-01-10 20:24:05 from Sonia Malave

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Mario 2007-01-10 20:39:05 Re: ayuda con planeador
Previous Message Cristian Saavedra 2007-01-10 20:26:58 Re: ayuda con planeador