![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Hi, I hope some experts can shed some light on this. I have a table that is very INSERT-heavy. Most of the days, it only needs to accept data, almost like a running log. About 500,000 INSERTs a day. Because this is such a rapidly growing table, SELECTing from this is a huge pain. There are 24 columns, and the SELECTing needs to happen from several of them, so we have 9 indexes. These indexes mean that the performance of the table is pretty lousy. So now I have two tables -- A and B. The structure of both is the *same*. Only, B has many indexes and is used for heavy duty SELECTs. On the other hand, A only accepts heavy duty INSERTs, so has only one primary key index. In other words, A is only an INSERT table. Periodically, say every 20 minutes or so, I would like to take all the new INSERTs from table A and put them into B. Is there any clever command to accomplish this? I'd rather not write a php script with the sql to take every single new record, and insert it one by one into table B. I currently use Postgres but am amenable to using any database if it supports this well. Thanks for any pointers!! LB -- Conan O' Brien gets it right!http://blogs.pcworld.com/tipsandtwea...es/004369.html |
![]() |
| Thread Tools | |
| Display Modes | |
| |