Re: [HACKERS] Fwd: Joins and links
От | Adriaan Joubert |
---|---|
Тема | Re: [HACKERS] Fwd: Joins and links |
Дата | |
Msg-id | 3781A62B.C1C9D7FA@albourne.com обсуждение исходный текст |
Ответ на | Re: [HACKERS] Fwd: Joins and links (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-hackers |
Tom Lane wrote: > > Thomas Lockhart <lockhart@alumni.caltech.edu> writes: > > Regardless of whether "there exist some real servers that offer such > > features I am talking", a departure from the relation model in a > > relational database is likely to lead to undesireable constraints and > > restrictions in our future development. Yep. Also, you fix one set of hard links and the next day you need to do a slightly different join and it doesn't fit into the links you constructed, because you left out a table or something silly. I used to work on a system storing and retrieving real-time trading data on Tandem. We were integrating it with their first-generation CORBA system, but could handle 70 updates a second + heavy reads of historical/real-time tick data. And this was on an old 4-processor K10000. Nearly all data was stored at least twice -- made the inserts slightly slower (Tandem is bloody good at inserts!) but otherwise we couldn't cope with the reads of several MBytes of historical data/query. Leon, I think you should study the accesses, and build the right intermediate tables. Yes, I know you are not supposed to duplicate data, but hey, this is the real world, and disk is cheap. And triggers etc make it fairly managable to retain integrity. But what is indispensable is the flexibility you have in a true relational model, so that you can easily adapt to changing demands -- adding temporary tables as you need them for new reports and dropping them as they go out of use. Of course you can use views, but this can still be slow. As far as I can see: if you know which hard links you need, you know which additional table you need to build. And knocking up the triggers to keep it updated is childs play. Ah, yes -- and I always have to add a sanity_function as well that can fix things when I've made a real balls-up ;-) Have fun, Adriaan
В списке pgsql-hackers по дате отправления: