From: | "Silvio Quadri" <silvioq(at)gmail(dot)com> |
---|---|
To: | "Gabriel Ferro" <gabrielrferro(at)yahoo(dot)com(dot)ar> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: recomendacion para BD grande |
Date: | 2008-05-26 17:28:28 |
Message-ID: | 61dc71dc0805261028ra8334b0p213914bb42d6c607@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
El día 26 de mayo de 2008 12:05, Gabriel Ferro
<gabrielrferro(at)yahoo(dot)com(dot)ar> escribió:
>
> Maestros, tengo una BD de personas y esta puede ser muy grande (millones de entradas). he construido las siguientes tablas
> PERSONAS
> documento character varying(10) NOT NULL,
> tipodoc smallint NOT NULL DEFAULT 13
> nombre character varying(200) NOT NULL,
> sexo character(1),
> datos character varying(255),
> fechanac timestamp without time zone,
> CONSTRAINT personas_pkey PRIMARY KEY (documento, tipodoc)
>
> LOCALIDADES
> codprov integer NOT NULL,
> coddpto integer NOT NULL,
> localidad character varying(200) NOT NULL,
> claveloc serial NOT NULL
>
> DEPARTAMENTOS
> coddpto integer NOT NULL,
> departamento character varying(50),
> codprov integer NOT NULL
>
> PROVINCIAS
> codprov smallint NOT NULL,
> provincia character varying(50),
>
> PERSONALOC
> documento character varying(10) NOT NULL,
> tipodoc smallint NOT NULL,
> claveloc integer NOT NULL
>
> les parece que es bueno tenerlo asi, o habria que buscar otra forma para que no se atoren las consultas?
>
a) ¿Una persona puede tener muchas localidades? En el caso que la
respuesta sea no, conviene que elimines la tabla personaloc.
b) Si la tabla va a tener millones de registros, tratá de convertir
documento en entero, a no ser que tengas letras en las bases de
origen.
c) La performance puede variar de acuerdo como hagas tus consultas.
Primero llená las tablas y después preocupate por el tunning.
Silvio
--
Silvio Quadri
From | Date | Subject | |
---|---|---|---|
Next Message | Carlos Pineda | 2008-05-26 17:40:17 | Re: Error por encoding |
Previous Message | Ricardo Granados Tiznado | 2008-05-26 17:13:25 | Re: Configuración de Postgres en un Server de Hosting |