Forum Stats

  • 3,852,417 Users
  • 2,264,102 Discussions


Query Performance Issue



  • User_OCZ1T
    User_OCZ1T Member Posts: 1,923 Gold Badge
    edited Jul 9, 2020 7:59AM

    You are spot on.

    There does exists frequency histogram on column NAME(having 14 distinct value) and STAT(having 7 distinct values) of table STAGE. Also there already exists a frequency histogram on column PUSER and height balanced histogram on column NAME of table REF1. But still they were not helping the existing query.

    By creating a column group on both on ref1 (puser, name) and stage(name, stat)  with histogram for both i.e. 'FOR COLUMNS SIZE 254'. The merge Cartesian removed automatically from the path by optimizer and its doing a hash join now with TAB1 finishing the query in quick time.

  • Jonathan Lewis
    Jonathan Lewis Member Posts: 10,056 Blue Diamond
    edited Jul 9, 2020 12:05PM

    I've written up a blog note giving some explanation of the suggestions I made:


    Jonathan Lewis