Re: datatype advice numeric vs. varchar

Поиск
Список
Период
Сортировка
От shakahshakah@gmail.com
Тема Re: datatype advice numeric vs. varchar
Дата
Msg-id 1169126887.565168.257320@v45g2000cwv.googlegroups.com
обсуждение исходный текст
Ответ на Re: datatype advice numeric vs. varchar  (Gene <genekhart@gmail.com>)
Список pgsql-general
On Jan 18, 1:25 am, genekh...@gmail.com (Gene) wrote:
> you're probably right, actually using LIKE with numeric works fine but
> of course i will have to contend with things like truncating zeros to
> the left etc... are there any advantages to using ascii encoding as
> far as performance of LIKE, REGEXES, INDEXES etc versus using UTF8?
>
> thanks, gene

You might want to check out the following link, particularly if your
database is UTF-8, use varchar for your TNs, and you want to look for
calls from certain NPA/NXX/block_id ranges, e.g. with "WHERE ani LIKE
'2015551%'. As I understand it, an index created with a simple "CREATE
INDEX blah ON tbl (ani)" won't get used in that situation, whereas one
created with "CREATE INDEX blah2 ON tbl (ani varchar_pattern_ops)"
will.

  http://www.postgresql.org/docs/8.2/interactive/indexes-opclass.html


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

Предыдущее
От: "ksherlock@gmail.com"
Дата:
Сообщение: Re: Alter definition of a column
Следующее
От: Thobiyas
Дата:
Сообщение: help me to solve the problem