![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have the following scenario for a database that I need to design, and would like some hints on what to improve or do differently to achieve the desired performance goal, disregarding hardware and postgres tuning. The premise is an attribute database that stores about 100 different attribute types as attribute values. Every X seconds, Y number of new attribute values are stored in the database. X is constant and currently between 6 and 20 seconds, depending on the setup. In the future X could become as low as 3 seconds. Y can, within the next 5-10 years, become as high as 200 000. That means that for example, every 6 seconds 100 000 attributes needs to be written to the database. At the same time, somewhere between 5-20 users needs to read parts of those newly written attributes, maybe in total 30 000 attributes. This continues for the duration of the field operation, which could be 18hrs a day for 6 weeks. So the total db size is up towards 200 gigs. |
|
Now here is how I suggest doing this: 1- the tables |
|
2- function a function that receives an array of data and inserts each attribute. perhaps one array per attribute data (type, posX, posY, data_type, value) so five arrays as in parameters ot the function 3- java client the client receives the data from a corba request, and splits it into, say 4 equally sized blocks and executes 4 threads that insert each block (this seems to be more efficient than just using one thread.) |
![]() |
| Thread Tools | |
| Display Modes | |
| |