Re: Using wildcard for table name ?

Поиск
Список
Период
Сортировка
От David Johnston
Тема Re: Using wildcard for table name ?
Дата
Msg-id 1374865039328-5765317.post@n5.nabble.com
обсуждение исходный текст
Ответ на Using wildcard for table name ?  (Francisco Leovey <fleovey@yahoo.com>)
Ответы Re: Using wildcard for table name ?  (Francisco Leovey <fleovey@yahoo.com>)
Список pgsql-novice
Francisco Leovey wrote
> I could join all tables into one to do the search but we want to keep data
> separated due to volume.

Pre-mature optimization is bad.

Partitioning is one solution while it has problems they are considerably
less-worse than what you are stuck with currently.

That said the answer to your specific question is NO.  Since you only
provided enough information to answer your specific question any advice that
may be offered is suspect since we know very little about your actual
situation.

I am curious how you deal with duplicate names and what you want returned in
that situation.  It may be worth having a master "name directory" table with
two columns.  The first column would be the person name and the second
column would be an array of table names in which that person name appears.
You would need triggers (or CRUD functions) to maintain consistency.  You
could then write a function that queries this table to find out which other
tables the name appears on and then you can create dynamic SQL queries for
just those tables.

David J.





--
View this message in context:
http://postgresql.1045698.n5.nabble.com/Using-wildcard-for-table-name-tp5765314p5765317.html
Sent from the PostgreSQL - novice mailing list archive at Nabble.com.


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

Предыдущее
От: Daniel Staal
Дата:
Сообщение: Re: Using wildcard for table name ?
Следующее
От: Francisco Leovey
Дата:
Сообщение: Re: Using wildcard for table name ?