Re: "_" in a serach pattern

Поиск
Список
Период
Сортировка
От Peter Koczan
Тема Re: "_" in a serach pattern
Дата
Msg-id 46A6B56E.3040405@gmail.com
обсуждение исходный текст
Ответ на Re: "_" in a serach pattern  (Ben Kim <bkim@tamu.edu>)
Список pgsql-admin
Most database systems can figure out the size (in bytes) of a column
rather quickly from offsets within a record. I doubt that postgres is
any different. The only difference I can think of is that it might be
slower to filter out trailing spaces of a char column before comparing,
though the actual string length may be cached somewhere. Semantically,
it should be no different. I haven't perused the source code enough to
know for sure.

Any of the developers that patrol this list can probably answer your
questions better, especially the question of matching or not matching
strings of different length.

Peter

Ben Kim wrote:
>> The only difference is that varchar can have a length limit, text is
>> always unlimited length. There's no significant performance
>> difference between either. For most intents and purposes, they're equal.
>
> Forgive me for diversion, but out of curiosity, would it make some
> difference whether strings of known length are compared or strings of
> unknown length are compared, like in join condition "using(address)"?
>
> Or, is the actual length stored in a separate field and read first so
> strings of different lengths wouldn't even need to be matched?
>
> Is there some reference on this subject other than the source code?
>
>
> Thanks.
>
> Ben K.
> Developer
> http://benix.tamu.edu
>


В списке pgsql-admin по дате отправления:

Предыдущее
От: "Phillip Smith"
Дата:
Сообщение: Re: Data directory was initialized by PostgreSQL version 8.3
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Data directory was initialized by PostgreSQL version 8.3