DB2 MQT:s

2010-03-09
2013-05-29
  • Jonas Söderström

    We would like to be able to get documentation for the materialized query tables in our db2 database. I have downloaded the source code and modified initViews function in Database.java.

    Added MATERIALIZED QUERY TABLE in String types:
    String types = {"MATERIALIZED QUERY TABLE","VIEWS"};

    and disabled the if statement:
    //if (rs.getString("TABLE_TYPE").equals("VIEW")) {  // some databases (MySQL) return more than we wanted

    This works ok for us but we think it would be nice to have this implemented in the main project. We have run this against a MySQL database and it still worked like a charm.

    What do you think?

    /Jonas Söderström

     
  • John Currier

    John Currier - 2010-03-11

    What does TABLE_TYPE equal when it's a MQT?  Some flavors of MySQL were returning more than what was requested with that query and I'd definitely prefer to limit the results to what was intended.

    Thanks,
    John

     
  • Jonas Söderström

    TABLE_TYPE equals "MATERIALIZED QUERY TABLE" so I think it would be safe for MySQL.

    Thanks,
    Jonas

     
  • John Currier

    John Currier - 2010-04-30

    Can you try the latest beta version and let me know how it works?  It uses new optional tableTypes and viewTypes settings in the .properties files to allow for customization of a database.

    John

     
  • Jonas Söderström

    Nice! It works as intended. Thank you for a great utility and keep up the good work.

    Jonas

     

Log in to post a comment.