Large table search question

Поиск
Список
Период
Сортировка
От John Wells
Тема Large table search question
Дата
Msg-id 39197.172.16.2.8.1085939701.squirrel@devsea.com
обсуждение исходный текст
Ответы Re: Large table search question  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Large table search question  (Richard Huxton <dev@archonet.com>)
Список pgsql-general
Guys,

I have a general question about designing databases for large data sets.

I was speaking with a colleague about an application we're preparing to
build.  One of the application's tables will potentially contain 2 million
or more names, containing (at least) the fields first_name, last_name,
middle_name and prefix.

A common lookup the application will require is the full name, so prefix +
first_name + middle_name + last_name.

My friend's suggestion was to create a "lookup field" in the table itself,
which would contain a concatenation of these fields created during insert.
 So, for each record, we'd having each individual field and then a
full_name field that would contain the combination of the ind. fields.
His argument is that this will make lookups in this manner extremely fast
and efficient.

I agree with his assertion, but get the feeling that this is sort of an
ugly design.  Would a compound index on these fields really be less
efficient?

Thanks for your help!

John

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

Предыдущее
От: Karsten Hilbert
Дата:
Сообщение: Re: Use arrays to store multilanguage texts
Следующее
От: Jurgen Defurne
Дата:
Сообщение: Re: Error handling in stored functions/procedures