cancel
Showing results for 
Search instead for 
Did you mean: 

Statistics Table in SAP HANA

Former Member
0 Kudos

Hi everybody,

I am relatively new to HANA and I have a question that most probably you will easily answer. Here is my problem...

I want to get some statistics regarding my tables and their columns (like histograms, etc). I came across a table named STATISTICS, which actually contains all the information I need. However, it's empty! So my question is...

How can I populate the statistics table in SAP HANA?

Thank you in advance for your assistance.

Regards,

Kanellos

Accepted Solutions (1)

Accepted Solutions (1)

lbreddemann
Active Contributor
0 Kudos

Hi Kanellos

currently (SP7/SP8) SAP HANA doesn't collect statistics for "owned" tables, so there won't be any entries present in the system table.

It is possible  to gather statistics for virtual tables that actually are present in remote databases, though.

Note that the query optimizers in SAP HANA don't require stored table/column statistics - they sample current values during the execution.

If you just want to learn about your data, then using the data preview against a table is pretty useful. It can show you data type, basic desc. stats and you can plot distribution and correlation between columns.

- Lars

Former Member
0 Kudos

Hi Lars,

Thank you for your fast reply.

The "open definition" view is quite helpful indeed, but I would rather inspect these results in a tabular format for all the tables I am interested in at a glance. Does HANA computes these statistics in an adhoc fashion when I am opening the "open definition" view or are they stored somewhere in a data dictionary table/view?

Thanks,

Kanellos

lbreddemann
Active Contributor

The runtime information are available in system views (m_cs_tables, m_cs_columns, etc.) and computed on the fly.

You my want to check my presentations "" and "" for examples on this.

I bet you'll find them interesting

- Lars

Answers (0)