Re: Help normalizing table(s)
От | Shridhar Daithankar |
---|---|
Тема | Re: Help normalizing table(s) |
Дата | |
Msg-id | 3DAF2AAB.19669.1CED932@localhost обсуждение исходный текст |
Ответ на | Help normalizing table(s) (Kevin Old <kold@carolina.rr.com>) |
Ответы |
Re: Help normalizing table(s)
|
Список | pgsql-general |
On 17 Oct 2002 at 11:12, Kevin Old wrote: > My solution to this is to store the data in tables by hour. This keeps > the tables relatively small (50-100K records) and helps with searching. > > Now on to the real questions: > > I need to be able to search more than one table at a time, but just > "union"ing the queries isn't a very good option as some users want to > search 48 hours worth of data.....that would result in 48 unioned > queries!!!! > How do I keep this table rather small (1 million records or so) and > still be able to search archived data? Are there any other ways that I > can do this? Why do I feel that you are using my design? Probably because you are solving same problem as I am solving..:-) In postgresql, you can inherit a table from another table. You can query on base table and gather rows from child table. So make an empty base table, make each hourly table child of base table and query on base table. It will take care of everything. Remove the hourly table after 48 hours.. Bye Shridhar -- Killing is wrong. -- Losira, "That Which Survives", stardate unknown
В списке pgsql-general по дате отправления: