Re: Optimization of this SQL sentence - Mailing list pgsql-performance

From Mario Weilguni
Subject Re: Optimization of this SQL sentence
Date
Msg-id 200610171729.19596.mweilguni@sime.com
Whole thread Raw
In response to Re: Optimization of this SQL sentence  (Alexander Staubo <alex@purefiction.net>)
Responses Re: Optimization of this SQL sentence
Re: Optimization of this SQL sentence
List pgsql-performance
Am Dienstag, 17. Oktober 2006 11:52 schrieb Alexander Staubo:
> Lastly, note that in PostgreSQL these length declarations are not  
> necessary:
>
>    contacto varchar(255),
>    fuente varchar(512),
>    prefijopais varchar(10)
>
> Instead, use:
>
>    contacto text,
>    fuente text,
>    prefijopais text
>
> See the PostgreSQL manual for an explanation of varchar vs. text.

Enforcing length constraints with varchar(xyz) is good database design, not a
bad one. Using text everywhere might be tempting because it works, but it's
not a good idea.

pgsql-performance by date:

Previous
From: Alexander Staubo
Date:
Subject: Re: Optimization of this SQL sentence
Next
From: "Merlin Moncure"
Date:
Subject: Re: Optimization of this SQL sentence