on 01-22-2021 12:18 PM
Dear All,
Hope everyone are doing Good & Safe!
My question here is whenever we run select count(*) from table name on huge table taking more time and using some memory when I am running the query.
I want to compare count of virtual table and physical table whether it is matching or not? and real time replication is working fine or not?
I can get physical tables count from (SELECT "TABLE_NAME","RECORD_COUNT","SCHEMA_NAME" FROM "SYS"."M_TABLES").
The problem here is with out using select count(*) from "VT_<Table_name>", How to get the count of all virtual tables from particular schema? Is there any standard table in HANA to get count of virtual tables from particular schema?
or
Suggest me any other way to get count with out using count(*) method?
Regards,
Deepthi
Hi Ratnadeepthi,
Since you want to get a count of all virtual tables from a particular schema, the query you use for physical tables should surely work with the "VIRTUAL_TABLES" system view instead ?
SELECT "TABLE_NAME","RECORD_COUNT","SCHEMA_NAME" FROM "SYS"."VIRTUAL_TABLES".
VIRTUAL_TABLES view contains this column information under "SCHEMA_NAME" & "TABLE_NAME"
FYI, you can a detailed overview of available System and monitoring views on HANA in this section of Admin guide :
SAP HANA SQL and System Views Reference > System Views Reference https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/latest/en-US/b4b0eec1968f41a099c828a4a6...
Kind Regards
Simon
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.