Hi all, a standard DBXTRACT reload.sql file contains a bunch of LOAD STATISTICS statements, typically based on a particular page size. AFAIK, they are used to refine the table statistics of the database that is to be built. Two related questions:
I'm just upgrading a custom extraction script, and the LOAD STATISTICS stuff is the only part that I cannot code myself:) So if it's not too useful, I'd like to omit it. Regards Volker (Currently using ASA 8.0.3.5574 but also testing with SA 11.0.1 and SA 12 beta.) asked 08 Mar '10, 13:10 Volker Barth |
I just found the answer to a similar question on the replication NG, cf. the thread "news://forums.sybase.com:119/e4CnfkiDCHA.289@forums.sybase.com" by Rob Waywell:
Please correct me if this answer (originally for ASA 8.0.1.2600) is not correct anymore or if there's more to pay attention to. answered 08 Mar '10, 14:32 Volker Barth Rob's response is just as applicable to recent SQL Anywhere releases as it was to 8.0.1. @Glenn: Thanks for the clarification. Then I should be fine without LOAD STATISTICS as long as I use LOAD TABLE with STATISTICS ON ALL COLUMNS (which seems to be the only option in pre 9.0.1 versions), correct? I.e. then LOAD TABLE should generate fitting statistics for the remote itself. 1
Right - the new statistics generated as part of LOAD TABLE processing will be accurate, though not as detailed in those parts of the distribution that have been previously queried and, consequently, saved in the extant histogram. Just for the record: As a consequence, I dropped all LOAD STATISTICS statements from our customized reload script, which makes this script easier to handle in case of schema updates. My impression is that the LOAD TABLE generated stats are not worse. However, as most remotes are quite small (< 25 MB), the impact is small, too. |
Just to add: I'm aware that LOAD STATISTICS is very useful when reloading a database in order to rebuild it (or to extract a remote that should contain all data). But that's not what I'm up to, here.