Hi Bernd, >From: Eckenfels. Bernd [mailto:[EMAIL PROTECTED] > >While running some queries on TABLESTATISTICS I noticed that it is >pretty slow. How do you handle those? Copy it to temp tables for >processing or are there some cached operations? > TABLESTATISTICS actually reads all pages of a table's b* tree, so it is quite natural that it is rather slow when used on large tables. If you're using release 7.5, you could use ESTIMATED_PAGES which is quite fast but only gives you a rough estimate of a table's size (and it also does not include the the amount of memory used by LONG columns). For indices you should use INDEXPAGES which has no speed penalty.
If you're using release 7.6 you also have the option to use the system view FILES which should give you the exact table size (currently excluding the memory used by LONG columns) and which is quite fast. Beware however, that this view's definition has been changed in the current CVS version. So it is probably safer to wait a couple of releases before relying on this table. By then it should also include the amount of memory used by LONG columns without any execution time penalty. Best wishes, Martin. SAP Labs, Berlin -- MaxDB Discussion Mailing List For list archives: http://lists.mysql.com/maxdb To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]
