![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||||||
| |||||||
|
|
OK..more questions! Informix on Linux. I read on one site that Informix does not allow concurrent index reorgs...that you have to |
|
drop table indexes and rebuilt them (ALTER INDEX CLUSTER). I dont |
|
know if it was an outdated website. Can anyone tell me if this is still true and how it affects high availability of the database? |
|
Also, I read that reorganizing the tables is a huge performance hit (ALTER FRAGMENT)...is this also true? |
|
There is also database statistics...are there issues with running this concurrently? |
|
Or anything else needed to be performed to keep the database running optimally that I did not mention? |
|
Once again, thanks for your time. _______________________________________________ Informix-list mailing list Informix-list (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list |
#3
| |||
| |||
|
|
The Clown said: Actually, if you set things up right from the get-go, you have to do very little indeed to maintain good performance with Informix. You asked: Can I ask what you mean by setting up things from the start to avoid the need for statistics updates and reorgs? |
|
I know you can place tables and indexes on separate disks for optimization. Also, utilizing indexed table partitions in DB2 allows the ability to reorg partitions separately. These do not eliminate or reduce the need for stats or reorgs...just makes it more efficient to run them. This is an OLTP database and there will be continuous updates, inserts and deletes that will cause fragmentation. |
|
Pray tell please...the suspense is killing me! _______________________________________________ Informix-list mailing list Informix-list (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list |
#4
| ||||
| ||||
|
|
*That said, while you have to drop an index (or at least disable it and re-enable it) to rebuild it, this operation does NOT require that the server be offline nor does it necessarily lock out access to the table during the index build (online index build is optional - offline index builds are normally a bit faster). * |
|
Also, I read that reorganizing the tables is a huge performance hit (ALTER FRAGMENT)...is this also true? Not sure what the question is here. *Are you asking if table performance suffers if you don't reorg the table periodically? *Are you asking if the reorg itself is a resource hog? * |
|
* * * 3. The table experiences frequent deletions of large numbers of data * *in a fairly random way relative to the order in which data was inserted into * *the database. *This can cause new rows to be scattered into the slots * *vacated by deleted rows, reducing the locality of recently inserted data. |
|
There is also database statistics...are there issues with running this concurrently? No. *The only issue is that statements PREPARED/optimized before the database statistics are generated will have their query plans invalidated and will need to be rePREPARED after the stats have been completed for the table(s) that the query accesses. |
#5
| |||
| |||
|
|
* *- When new rows are inserted after this big DELETE, they will fillin the * *holes in the existing pages, which mainly contain older transaction data, * *rather than be inserted into new pages containing only newer transaction * *data. * *- Now when you run a daily transaction report it must access single rows * *in slots spread across a large percentage of the table's storage pages * *rather than just accessing a relative few pages containing the most recent * *transaction data which will most likely be in memory already. This is rare in the real world. Such random (relative to the insertion order) deletes just are not part of an OLTP system. *Even history purges are relatively rare things, but they don't affect performance in the same way anyway. |
#6
| |||
| |||
|
#7
| ||||||
| ||||||
|
|
On Sep 2, 1:18 pm, Art Kagel <art.ka... (AT) gmail (DOT) com> wrote: That said, while you have to drop an index (or at least disable it and re-enable it) to rebuild it, this operation does NOT require that the server be offline nor does it necessarily lock out access to the table during the index build (online index build is optional - offline index builds are normally a bit faster). Are you saying that, "Yes...you can definitely perform an online index reorg that will not affect write access and with a minor performance hit"? |
|
I am not necessarily concerned with the speed of completing the task. My main concern is if we do have to perform the index reorg, that we can continue to run normally. We can work around other issues like scheduling it during slower periods and such. Also, I read that reorganizing the tables is a huge performance hit (ALTER FRAGMENT)...is this also true? Not sure what the question is here. Are you asking if table performance suffers if you don't reorg the table periodically? Are you asking if the reorg itself is a resource hog? I was actually asking if the reorg is a resource hog but mainly because I assumed that all DBMS worked similarly when dealing with fragmentation. In our product we would normally be plagued by reason #3: |
| 3. The table experiences frequent deletions of large numbers of data in a fairly random way relative to the order in which data was inserted into the database. This can cause new rows to be scattered into the slots vacated by deleted rows, reducing the locality of recently inserted data. ...along with frequent inserts. We dont normally delete a large number of rows at the same time but over a span of time (around 5k per hour maybe). Inserts, however do come in chunks of 5k or 10k periodically but infrequently (maybe a bulk insert once a month). So nothing extreme. With our current DB2 system have to REORG about once every 4 months on a very busy machine with maybe 800k rows in the main table. The REORG we do is online and allows write access. Im sure it does not do a physical data reorganization but probably more like what API REPACK does. Although, I dont know techincal details on Online REORG. So, my phrasing may be misleading. When I say reorg I dont mean physical reorganization of the tables. One thing to add DB2 REORG also does online index reorgs as well. This is all done without impacting the update availability. Yes, but DB2 doesn't clean indexes live, so reorgs of indexes are needed. |
| There is also database statistics...are there issues with running this concurrently? No. The only issue is that statements PREPARED/optimized before the database statistics are generated will have their query plans invalidated and will need to be rePREPARED after the stats have been completed for the table(s) that the query accesses. Does the application need to redrive the PREPARED statement or is that |
|
handled internally by IDS? In DB2 statistics take some time to run (perhaps a minute) so are you saying queries coming in during the time of the stats update have to wait seconds or minutes for stats to finish? |
|
Our system requires 24/7 availability and would not tolerate any significant performance degradation, even for a short time, or any delay in query operations, even for a few seconds. Further, a maintenance outage, even once a year, is intolerable for most of our customers. So my goal is high availability...no database outage. (My next research will have to do with concurrent database migrations!) _______________________________________________ Informix-list mailing list Informix-list (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list |
#8
| |||
| |||
|
|
This may be our difference since we dont delete the "oldest" row inserted. *However, I disagree with this being rare. We may not delete what would be perceived as the oldest row inserted but we do delete when records expire. *A record reaching its expiration date may be due to other elements besides just being the oldest one inserted. Therefore, you can have pockets of data deleted within your table. *I would think this would be more common than having a database table that always deletes the oldest record. *Things in this world dont normally happen so serially! |
#9
| |||
| |||
|
|
You may want to use the expiration date in a fragmentation(partition) strategy, this may reduce the issue a bit.... ideally You could run a purge expired data as a detach fragment. this eliminates the issue of "haveing pockets of data deleted within your table." Dono how long the expired data my be in your database; suppose you could have a week of that stuff in your db then at the end of the week detach the current week of expired data. however this may not be possible in your case. Superboer. This may be our difference since we dont delete the "oldest" row inserted. However, I disagree with this being rare. We may not delete what would be perceived as the oldest row inserted but we do delete when records expire. A record reaching its expiration date may be due to other elements besides just being the oldest one inserted. Therefore, you can have pockets of data deleted within your table. I would think this would be more common than having a database table that always deletes the oldest record. Things in this world dont normally happen so serially! _______________________________________________ Informix-list mailing list Informix-list (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list |
#10
| |||
| |||
|
|
I get the definite impression that there is no "expiration_date" column in the table, but that certain conditions on these rows and rows in related tables determine the expiration of a row. Art Art S. Kagel Advanced DataTools (www.advancedatatools.com) IIUG Board of Directors (a... (AT) iiug (DOT) org) Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on my employer, Advanced DataTools, the IIUG, nor any other organization with which I am associated either explicitly, implicitly, orby inference. *Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves. On Fri, Sep 3, 2010 at 7:37 AM, Superboer <superbo... (AT) t-online (DOT) de> wrote: You may want to use the expiration date *in a fragmentation(partition) strategy, this may reduce the issue a bit.... ideally You could run a purge expired data as a detach fragment. this eliminates the issue of *"haveing pockets of data deleted within your table." Dono how long the expired data my be in your database; suppose you could have a week of that stuff in your db then at the end of the week detach the current week of expired data. however this may not be possible in your case. Superboer. This may be our difference since we dont delete the "oldest" row inserted. *However, I disagree with this being rare. We may not delete what would be perceived as the oldest row inserted but we do delete when records expire. *A record reaching its expiration date may be due to other elements besides just being the oldest one inserted. Therefore, you can have pockets of data deleted within your table. *I would think this would be more common than having a database table that always deletes the oldest record. *Things in this world dont normally happen so serially! _______________________________________________ Informix-list mailing list Informix-l... (AT) iiug (DOT) org http://www.iiug.org/mailman/listinfo/informix-list |
![]() |
| Thread Tools | |
| Display Modes | |
| |