![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hi all, I have a issue with purging. The tables in my database are partitioned based by month, so i want to purge the partition based on monthly basis, in total 8 months partitions each where each months size is approx 140GB My questions are : Is it possible to purge 8 months partition at a time ? meaning by issuing detach command in one script and executing it - if yes - then i would be having locking issues - which means the Async Index clean up might take very long to complete and my maintenance window time is just 4 hours. As there are 20 tables with an average of 10 million pages in each one of them. if tried to detach one partition at a time then it takes approx 3 hrs for Async Index cleanup to complete. I would appreciate - if anyone of you can suggest a smart solution in order to speed up the process. Nevertheless : I thought of other alternatives too but not sure about the performance and how it would impact the system. 1) Emptying the tables on monthly basis by deleting with 10000 rows per execution, which would too tedious In order to speed up the process is if try deleting 1 million rows then i might be filling up the logs. In order to avoid log, i should try to alter the table with NOT LOGGED statement. (This change i cannot implement as per the company norms). Then thought of doing online reorg. I am running out of ideas, please suggest me a novel way to speed up this process. Regards Raoul |
#3
| |||
| |||
|
|
hi all, I have a issue with purging. The tables in my database are partitioned based by month, so i want to purge the partition based on monthly basis, in total 8 months partitions each where each months size is approx 140GB My questions are : Is it possible to purge 8 months partition at a time ? meaning by issuing detach command in one script and executing it - if yes - then i would be having locking issues - which means the Async Index clean up might take very long to complete and my maintenance window time is just 4 hours. As there are 20 tables with an average of 10 million pages in each one of them. if tried to detach one partition at a time then it takes approx 3 hrs for Async Index cleanup to complete. I would appreciate - if anyone of you can suggest a smart solution in order to speed up the process. Nevertheless : I thought of other alternatives too but not sure about the performance and how it would impact the system. 1) Emptying the tables on monthly basis by deleting with 10000 rows per execution, which would too tedious In order to speed up the process is if try deleting 1 million rows then i might be filling up the logs. In order to avoid log, i should try to alter the table with NOT LOGGED statement. (This change i cannot implement as per the company norms). Then thought of doing online reorg. I am running out of ideas, please suggest me a novel way to speed up this process. Regards Raoul |
#4
| |||
| |||
|
|
"Naresh Chainani" <fornaresh (AT) gmail (DOT) com> wrote in message news:89c9b2f2-6367-4412-a11f-b28343f2c84a (AT) p22g2000pre (DOT) googlegroups.com... Have you considered using partitioned indexes (also known as local indexes)? There is no asynchronous index cleanup for local indexes since the local indexes become indexes on the target table of detach. Naresh |
#5
| |||
| |||
|
|
"Naresh Chainani" <fornar... (AT) gmail (DOT) com> wrote in message news:89c9b2f2-6367-4412-a11f-b28343f2c84a (AT) p22g2000pre (DOT) googlegroups.com.... Have you considered using partitioned indexes (also known as local indexes)? There is no asynchronous index cleanup for local indexes since the local indexes become indexes on the target table of detach. Naresh I don't know what the OP's database looks like, but there are some restrictions to partitioned indexes that make it difficult to use in all situations. The main restriction is that the table partitioning key must be included in all unique indexes (which means all PK's and Unique Constraints). This is usually not a big problem with a star schema, but can be difficult in an OLTP traditional 3rd Normal Form design. |
![]() |
| Thread Tools | |
| Display Modes | |
| |