Shared databases
Posted: Thu Apr 07, 2011 5:21 pm
We would like to structure our Texis databases in such a way that one of the tables, which contains essentially static data, could be shared by databases on multiple servers. Because of the huge size of the table, our idea is to place the .tbl file itself on a network-addressable drive, and use addtable to add it as a table to each of the databases on the network. In this scheme, only this table would be shared. That is, *none* of the other tables in any of of the databases, nor any of the indexes, would be shared. We're thinking that even the indexes for the shared table would be unshared. One requirement we have is that, while the data in the table will never be modified (it contains patent data records), records will be periodically added to the table. It will be important at those times for all of the indexes on the table (there are nearly twenty) to be maintained.
I tried setting up a simple scheme involving two servers and the network-addressable drive, for which a mapped network drive letter was assigned. (This is a Windows server network.) I put a .tbl file on the n/w drive, and was able to use addtable to add it to a database on each of the two servers. I was also able to read, (via sql select) from the table from both dbs. I also created an inverted metamorph index on the table from each database. So far, no problem and all went well, but there's an issue.
The issue is that when I insert a record into the table from the database on one server, the index for the table updates on that server, but not on the other server. I tried using chkind on the second server but that did not seem to work. Of course it was a trivial matter to recreate the index on the second server in this test scenario. But we are *loathe* to recreate all of the indexes on the table in every database every time we add data to the production table. Eventually, data will be added weekly. As I said, the table is huge and most of the indexes each take many hours to create. And also as I said, there are nearly twenty indexes. The alternative, which is the scheme we are currently using, is for each database to have its own patent data table as well as its own indexes. This seems like a huge waste of disk space, and we'd also like to streamline the (cumbersome) process of loading the weekly data into a single, shared table. Moreover, the shared scheme (assuming the indexes are maintained) seems to eliminate any possible inconsistency in the data from one server to the next.
Is the shared scheme we are envisioning a fantasy? Is there a better way to accomplish what we're looking for? Your guidance and insight would be appreciated.
Thanks.
I tried setting up a simple scheme involving two servers and the network-addressable drive, for which a mapped network drive letter was assigned. (This is a Windows server network.) I put a .tbl file on the n/w drive, and was able to use addtable to add it to a database on each of the two servers. I was also able to read, (via sql select) from the table from both dbs. I also created an inverted metamorph index on the table from each database. So far, no problem and all went well, but there's an issue.
The issue is that when I insert a record into the table from the database on one server, the index for the table updates on that server, but not on the other server. I tried using chkind on the second server but that did not seem to work. Of course it was a trivial matter to recreate the index on the second server in this test scenario. But we are *loathe* to recreate all of the indexes on the table in every database every time we add data to the production table. Eventually, data will be added weekly. As I said, the table is huge and most of the indexes each take many hours to create. And also as I said, there are nearly twenty indexes. The alternative, which is the scheme we are currently using, is for each database to have its own patent data table as well as its own indexes. This seems like a huge waste of disk space, and we'd also like to streamline the (cumbersome) process of loading the weekly data into a single, shared table. Moreover, the shared scheme (assuming the indexes are maintained) seems to eliminate any possible inconsistency in the data from one server to the next.
Is the shared scheme we are envisioning a fantasy? Is there a better way to accomplish what we're looking for? Your guidance and insight would be appreciated.
Thanks.