Informix

nested-group-icon.png

DB2

Expand all | Collapse all

unused tables

  • 1.  unused tables

    Posted Wed October 21, 2020 09:17 AM
    Hi

    Is there a way to identify unused tables on a database , not accessed for a while  ?

    thanks :)

    ------------------------------
    John Smith
    ------------------------------


  • 2.  RE: unused tables

    Posted Wed October 21, 2020 09:45 AM
    Monitor the contents of the sysptprof pseudotable in sysmaster, join to systabnames on partnum to get the database and table name. Select and save that data say daily before any daily stats reset (onstat -z) if you run them. Then you can track activity over time. Note that update statistics will add to the reads against tables it processes.

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 3.  RE: unused tables

    Posted Wed October 21, 2020 10:00 AM
    Thanks a lot :)

    ------------------------------
    John Smith
    ------------------------------



  • 4.  RE: unused tables

    Posted Wed October 21, 2020 10:02 AM
    Just for instance,sysptprof  aleady contains dbsname and tabname :)

    ------------------------------
    John Smith
    ------------------------------



  • 5.  RE: unused tables

    Posted Wed October 21, 2020 10:11 AM
    Arg. Serves me right for not checking. 

    Art





  • 6.  RE: unused tables

    Posted Wed October 21, 2020 10:51 AM

    Meaningless join ?

     

    Cheers

    Paul

     






  • 7.  RE: unused tables

    Posted Mon October 26, 2020 08:11 AM
    Hi John.

    In version 14.10 oncheck reports "Last Lookup/Scan"  with a timestamp when it was last accessed. 

    Best regards,
    -Snorri






    ------------------------------
    Snorri Bergmann
    ------------------------------