...
To enable these XXL/XXS rules it is necessary to provide the analyzer with table row size information in XML based *.sqltablesize files. This can be done as follows using CAST Management Studio:
Using the "out of the box" analyzers
...
Deliver the *.sqltablesize files that define your table row size information along with your database extraction files in the ZIP file or the source code upload folder:
...
Using CAST Management Studio
you You can configure the Table Size Folder option in the relevant Analysis Unit editor in the CAST Management Studio. This folder must be populated with the *.sqltablesize files that define your table row size information. For example:
...
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="UTF-8" ?> <config name="SQL Table Size" version="1.0.0.0" extraction-date="2009/02/10" > <ibm-zos> <server name="Bordeaux" > <database name="cwmm"> <schema name="cwmm"> ... <table name="ACC" rows="1000000="1.0.0.0" extraction-date="2009/02/10" > <ibm-zos> <server name="Bordeaux" > <database name="cwmm"> <schema name="cwmm"> ... <table name="ACC" rows="1000000"/> ... </schema> </database> </server> </ibm-zos> </config> |
SAP
Code Block | ||
---|---|---|
| ||
<?xml version="1.0" encoding="utf-8"?> <config name="SQL Table Size" version="v8.0.3" extraction-date="2017/12/04/15/33/19"> <!--Following data are extracted from MANDANT:100--> <sap> ... <table name="/.../..." client-dependant="X" rows="9"/> <table name="/.../..." client-dependant="X" rows="2"/> ... </schema>sap> </database> </server> </ibm-zos> </config> config> |
Anchor | ||||
---|---|---|---|---|
|
...
Code Block | ||
---|---|---|
| ||
SELECT concat(n.nspname, '.',relname, '=', reltuples::bigint) as TABLESIZE
-- n.nspname = schema_name,
-- relname = Table_Name,
-- reltuples = number of rows in the table
FROM pg_class, pg_namespace n
WHERE pg_class.relnamespace = n.oid
AND relkind = 'r' -- r = ordinary table
AND n.nspname NOT LIKE 'pg_%' -- we don't want the system tables
AND n.nspname = 'XXX' -- to be specified |
...