From: | Vernon Wu <vernonw(at)gatewaytech(dot)com> |
---|---|
To: | mlennert(at)club(dot)worldonline(dot)be, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: performance question |
Date: | 2003-01-21 05:32:25 |
Message-ID: | ED1UMKFDE0A6MIJF1ZDC8563A8OK3Y87.3e2cdb69@kimiko |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
20/01/2003 12:38:20 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>"Moritz Lennert" <mlennert(at)club(dot)worldonline(dot)be> writes:
>> One question I asked myself is whether the use of char(2) is the best
>> option.
>
>It may not be, particularly if you are running in a non-English locale.
>Comparisons will invoke the standard library routine strcoll(), which is
>depressingly slow in some locales, at least on some platforms.
>
In the case of selection operations involving multiple tables joined by userid that can be in various languages, is a
potential performance trouble spot? Considering the number of tables anywhere from ten to twenty.
>> The column (and most others in the table) contains codes that
>> designate different characteristics (for ex. in a column 'sex' one would
>> find '1'=male, '2'=female).
>
>If you are using numeric codes you are surely better off storing them
>as integer or perhaps smallint (integer is less likely to create type
>mismatch headaches, though). In the above example you are getting the
>worst of both worlds: there's no mnemonic value in your data entries,
>*and* you're paying for textual comparisons.
>
> regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
From | Date | Subject | |
---|---|---|---|
Next Message | David Durst | 2003-01-21 10:40:02 | returning setof in plpgsql |
Previous Message | Joe Conway | 2003-01-21 01:45:44 | Re: Could someone help me fix my array_list function? |