VERBOSE
Example
Section titled “Example”EXPLAIN (VERBOSE true, FORMAT YAML)SELECT * FROM customer;Output
Section titled “Output”- Plan: Node Type: "Seq Scan" Relation Name: "customer" Alias: "customer" Startup Cost: 0.00 Total Cost: 13.60 Plan Rows: 360 Plan Width: 36 Output: - "customer_id" - "customer_name"Explanation
Section titled “Explanation”The VERBOSE option in PostgreSQL’s EXPLAIN command provides additional details about the query plan. The provided query uses VERBOSE to display the names of the output columns (customer_id and customer_name) in the execution plan for a sequential scan on the “customer” table. The FORMAT YAML formats the output in YAML (Yet Another Markup Language) for readability.
Example
Section titled “Example”BEGIN DBMS_OUTPUT.ENABLE (buffer_size => NULL); DBMS_OUTPUT.PUT_LINE ('Hello, World!');END;/SET SERVEROUTPUT ON;/Output
Section titled “Output”Hello, World!Explanation
Section titled “Explanation”This block of PL/SQL code starts with BEGIN and ends with END;. Inside this block, the DBMS_OUTPUT.ENABLE procedure is called to enable the output to the screen with buffer_size => NULL setting the buffer size to the maximum. DBMS_OUTPUT.PUT_LINE is then used to print ‘Hello, World!’ to the screen. To actually see the results, SET SERVEROUTPUT ON; has to be executed after the block. This will turn server output on allowing the results of the DBMS_OUTPUT.PUT_LINE to be seen.