Обсуждение: What is faster?

Поиск
Список
Период
Сортировка

What is faster?

От
"Mihai Gheorghiu"
Дата:
I have a short table (10 records) with a primary key column.

What primary key column data type will make search faster: int2 or char?
What about char(n) n=2,3...?
I'm looking for speed, as that search is very frequent.

Thanks,

Mihai Gheorghiu


Re: What is faster?

От
"ADBAAMD"
Дата:
Mihai Gheorghiu wrote:

> I have a short table (10 records) with a primary key column.
>
> What primary key column data type will make search faster: int2 or char?
> What about char(n) n=2,3...?
> I'm looking for speed, as that search is very frequent.

    With such a short table, won't a index lookup actually make your query
slower?



--
  _
/ \   Leandro Guimarães Faria Corsetti Dutra         +55 (11) 3040 8913
\ /   Amdocs at Bell Canada                          +1 (514) 786 87 47
  X    Support Center, São Paulo, Brazil          mailto:adbaamd@bell.ca
/ \   http://terravista.pt./Enseada/1989/    mailto:leandrod@amdocs.com