View the execution time and SP2-0027 errors of an SQL statement in the Oracle database
Source: Internet
Author: User
Go to sqlplus
SQL> set timing on
SQL>
SQL> select count (*) from comm_human_role;
Count (*)
----------
866
Elapsed: 00:00:00. 05
The preceding digital outputs are: Hours: Minutes: seconds. milliseconds.
It takes 0.05 seconds to execute, which is equivalent to 50 milliseconds.
If the time is as follows: 00: 03: 235.78
The total time is 235.78 seconds, less than 4 minutes, so it is 3 minutes (235.78 seconds is about 3 minutes 55.78 seconds)
# Set screen row width
SQL> set linesize 190
# Set sqlplus to print the execution plan and statistics
SQL> set autotrace on
# Set sqlplus printing execution time
SQL> set timing on
If the following error occurs in sqlplus:
SP2-0027: input is too long (& gt; 2499 characters)-line ignored
It indicates that the SQL statement contains more than 2499 characters.
Solution:
Add "enter" in an SQL statement ",
Make sure that each line does not exceed 2499 characters, and re-execute the SQL statement.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service