Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

CANNOT BE OPTIMIZED DUE TO QUERY TYPE

edited February 2017 in General Discussion

Vertica 7.2.3 database designer:

Loading queries from '/home/dbadmin/dd/q'.
Processed 2 SQL statement(s), all accepted and considered in the design.
Query 1 optimization ratio or status is 1
Query 2 optimization ratio or status is CANNOT BE OPTIMIZED DUE TO QUERY TYPE
Generated deployment script successfully

The two queries are:
select t.id_u, count(t2.id_gw)
from tran_gw_stage t
left join tran_gw t2 on t2.card_id_gw=t.card_id_gw
and t2.merchant_name=t.merchant_name
group by t.id_u;

select t.id_u, count(t2.id_gw)
from tran_gw_stage t
left join tran_gw t2 on t2.card_id_gw=t.card_id_gw
and t2.merchant_category=t.merchant_category
group by t.id_u;

Both queries are valid, and have only only one column name different.
Why can query #2 not be optimized?

Comments

  • skamatskamat Administrator

    I don't have much details about your schema and environment, but can you please remove first query and try DBD only with second query only ?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.