how to change the group by in the SQL

In some cases, ordering/changing the group by will make alot difference in terms of performance; DB like DB2, Redbrick, Sybase are good examples for this.

we had a requirement in DB2, where Db2 asked us to change the group by order to make the SQL works better.

Solution:

  • In the project configuration (project level) –> Report Definition –> SQL Generation –> attribute weights –> <add the attributes in order the way you like to force it in the select clause so that group by will change automatically>
  • By combining “Attribute Weights” and the “Max Columns in Index” settings, a user can designate any attribute to be included in the index.

About Senthilraj

DW BI Architect and BI Project Management (Specialized in MicroStrategy). Hobbies/Passion about photography, tennis, music, travel-trekking. Website: www.b-diamonds.com www.facebook.com/SENRAJ81 www.linkedin.com/in/senraj


Notice: compact(): Undefined variable: limits in /home1/microoat/public_html/blog/wp-includes/class-wp-comment-query.php on line 821

Notice: compact(): Undefined variable: groupby in /home1/microoat/public_html/blog/wp-includes/class-wp-comment-query.php on line 821

Notice: compact(): Undefined variable: groupby in /home1/microoat/public_html/blog/wp-includes/class-wp-comment-query.php on line 821

Warning: count(): Parameter must be an array or an object that implements Countable in /home1/microoat/public_html/blog/wp-includes/class-wp-comment-query.php on line 399