Discussions

Expand all | Collapse all

How to Check MetaData Information about the Tables/Database

  • 1.  How to Check MetaData Information about the Tables/Database

    Posted 04-25-2019 06:01
    Please let us know how we can check MetaData information about the Tables. For Example- Table size.
    #Core


  • 2.  RE: How to Check MetaData Information about the Tables/Database

    Posted 04-25-2019 10:24
    Hi @Sumit Srivastava

    Thanks for using OmniSci.

    From `omnisql` or immerse Data Manager you can see the CREATE TABLE statement for a table and the number of rows.

    Are you referring to the on disk size of the table (speculating from your other recent question) .  We do not have that facility currently, but would be interested to hear what you feel would be useful there.

    regards,


  • 3.  RE: How to Check MetaData Information about the Tables/Database

    Posted 04-26-2019 05:14
    Edited by Candido Dessanti 04-26-2019 05:14
      |   view attached
    Hi @Sumit Srivastava

    as @dwayneberry said there isn't a built-in command to get the size of table and dictionary, but you can try the shell script in attach
    the parameters you have to provide are the name of the database,  the name of the table and the path of data directory (the one specified in omnisci.conf)

    as an example, to get the disk size of a table named orders of the database tpch1000 (1B rows)
    mapd@zion-tr:~$ ./table_size.sh tpch1000 orders /opt/mapd_storage/data/
    Table orders - Data size 39080768 KBs Dictionaries size: 15450172 KBs
    ​

    This simple script works on single machine installation and non-sharded tables; if you need more features, feel free to ask


    Attachment(s)

    zip
    table_size.zip   611B 1 version