SQL Reference
Data Definition Language (DDL)...
Query Analysis
you can analyze queries by commands that instruct {{ocient}} to return plan related information for a database administrator or analyst to evaluate the results of these commands are vital in performance optimization activities on an ocient system explain explain shows the optimized query plan the database optimizes the query normally, but it does not execute instead, the database returns the query plan in the specified format syntax explain \[ proto | json | debug ] query 100,106,456 2 false true unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type this table defines the explain plan formats 100,486 true false unhandled content type false unhandled content type unhandled content type false unhandled content type unhandled content type false unhandled content type unhandled content type false unhandled content type examples this example shows the optimized plan for the query select from names in json format explain select from names; this explain example generates a lengthy output showing the execution plan for the query this execution plan shows how the database scans the tables referenced by the statement and calculates the memory usage and total execution cost this example shows the optimized plan for the query select from names in debug format, which produces a more compact execution plan explain debug select from names; output root op @ (0x7eae71515c40), id 94921393, md 2, out (1) time x | reorder op @ (0x7f4c19ee1c40), id 94921392, md 0, out (1) time x | no op reorder rename op @ (0x7f49b1bc2c40), id 94921390, md 2, out (1) time x | old2new (loc time x > time x) gather op @ (0x7f49b7886a40), id 94921389, md 2, out (1) loc time x | gather op @ (0x7f49b78866c0), id 94921388, md 2, out (1) loc time x | random shuffle op @ (0x7f486825ba40), id 94921394, md 2, out (1) loc time x | index op @ (0x7f49b792f040), id 94921387, md 1, out (1) loc time x | explain pipeline explain pipeline shows the pipeline the system uses for compiling a query the system compiles the pipeline for the specified segments, and if no segment is specified, it picks random segments with the tables to explain a pipeline, you must be a system level user or possess the select table privilege for the table used in the query syntax \ to show pipeline for a random segment explain pipeline query \ to show pipeline for a specific segment explain pipeline for segment 'storage id' on query \ to show pipeline for multiple specific segments explain pipeline for segment in ('storage id' \[, ]) on query 120,95,385 false true unhandled content type unhandled content type false unhandled content type unhandled content type unhandled content type false unhandled content type unhandled content type unhandled content type false unhandled content type examples this example shows the pipeline on the query select from names for a random segment explain pipeline select from names; this example shows the pipeline for the segment with the identifier 529a2e9d d06c 46cd a93b 624d3bed1c08 explain pipeline for segment '529a2e9d d06c 46cd a93b 624d3bed1c08' on select from names; this example shows the pipeline for segments with these identifiers 529a2e9d d06c 46cd a93b 624d3bed1c08 , 378eac93 2e3d 4ce6 bf1f d8b7a78fe585 explain pipeline for segment in ( '529a2e9d d06c 46cd a93b 624d3bed1c08', '378eac93 2e3d 4ce6 bf1f d8b7a78fe585') on select from names; all the examples generate lengthy output that includes the execution plan for the query for the specified segments this execution plan shows how the database scans the tables referenced by the statement and calculates the memory usage and total execution cost related links sql reference docid\ twelobi0rarxjfiot1a70