I am running a explain plan in hive it gives me below error.
Plan not optimized by CBO. When I checked the logs it says.
2016-03-14 00:37:12,082 INFO [HiveServer2-Handler-Pool: Thread-41]: parse.BaseSemanticAnalyzer (CalcitePlanner.java:canCBOHandleAst(392)) - Not invoking CBO because the statement has too few joins
What does that mean?
What is query that you trying to execute.
See logs for msg :
"parse.BaseSemanticAnalyzer: Not invoking CBO because the statement has too few joins"
Follow this :
https://community.hortonworks.com/questions/4759/hive-explain-says-plan-not-optimized-by-cbo-due-to.html
Related
in Postgres DB, found a simple select statement cost 1 days+ and seems will not finished. currently DB resource consumption is normal and I execute that SQL manually, but it completed in several seconds successfully.
and I executed SQL "SELECT relation::regclass AS relname, * FROM pg_locks where pid = '2066446'; The results found, there are 8 "AccessShareLock" types and 1 "ExclusiveLock" type.
I am not sure this could help on debug this long running SQLs. Could you please give me some directions on how to debug further for this issue?
add query plan here:
I want to get the query plan in Exasol database to check the total execution time, memory and cpu usage. Profiling in Exasol is so complex and difficult to understand.
Is there any way to get the query plan like explain analyze in PostgreSQL or any other simple way?
Please explain how to read the query plan in Exasol without executing the query?
You can check the EXASOL User Manual about profiling a query. I agree it's a bit cumbersome :)
Or you can use the scripts I wrote to have an explain like command: exasol-explain
Maybe it will be useful for someone who will try to use EXASOL Explain. There is a script with one missed field in select statement in exasol-explain/scripts/sqlprofile.lua, after temp_db_ram_peak field should follow:
max(PERSISTENT_DB_RAM_PEAK) as PERSISTENT_DB_RAM_PEAK
Otherwise "explain" and "explain_this" return an error "incorrect numbers of result column"
How can I get instumemtation in monetdb ? I need thedetails like planning time , execution time for each MAL statement in monetdb . Is there any command for it ?
The planning time is reported in the Default branch as part of the EXPLAIN.
For all branches you can use sys.querylog_catalog() to see compilation times.
The individual MAL instruction timing can be observed with the TRACE modifier:
For more information see:https://www.monetdb.org/Documentation/Cookbooks/SQLrecipes/QueryTiming
In my logging database I have serveral qualifiers specifying the logged action. A few of them are built like 'Item.Action' e.g. 'Customer.Add'. I wonder which approach will be faster if I want to get all logging items that starts with 'Customer.':
SELECT * FROM log WHERE action LIKE 'Customer.%'
or
SELECT * FROM log WHERE action IN ('Customer.Add', 'Customer.Delete', 'Customer.Update', 'Customer.Export', 'Customer.Import')
I use PostgreSql.
Depends on indexes on log table. Most likely - queries will have the same performance. To check - use explain or explain analyze. Queries with the same execution plan (output of explain) will have the same performance.
Is it possible to view the query execution plan for evaluating a SPARQL query in AllegroGraph (something like EXPLAIN).
AllegroGraph provides a query analyzer through a Lisp API and REST API that will tell you what indices are being utilized. For more information, look at the following link (this is for AllegroGraph v4.14.1):
http://franz.com/agraph/support/documentation/v4/query-analysis.html
There is no explain query command in SPARQL, but here are two ways to execute SPARQL queries with verbose output which includes the query plan:
click "Show Plan" in AllegroGraph Webview;
or add the AllegroGraph query option PREFIX franzOption_logQuery: <franz:yes> to the query, which will write an execution log to agraph.log