Oracle SQL statement Optimization
Although orm ing is used in the project, the optimization of the Oracle system is very valuable. Here we will summarize the commonly used statements from the perspective of SQL statements.
1. Optimization in the
Whether the Oracle database query object is locked and unlocked
For details about whether the Oracle database object is locked, see the following SQL statement and the unlock process:
-- Query the locked objects of the current userSelect B.
Archive logs (below), archive logs (
1 SQL> archive log list; # Check whether the archive mode is used2 SQL> alter system set log_archive_start = true scope = spfile; # enable active ArchivingSQL> alter system set log_archive_dest = 'location
Oracle array, oracle
Defines an array of 5 strings.
Type str_array is varray (5) of varchar2 (30 );
V_str_array str_array: = expr_key_array ('A', 'bb ', 'cc', 'dd', 'ee ');
For I in 1 .. v_str_array. count loopDbms_output.put_line (v_expr_key );
End
Oracle memory structure, oracle Structure
The memory structure of Oracle is divided into SGA and PGA. SGA is dynamically allocated. It is configured by the sga_max_size parameter and allocated when the oracle database instance is started, share an
MySQL grouping and sorting takes the first N records and generates an automatic number sequence -- group by after limit plus rownumber, -- grouprownumber
My colleague asked me to group by column and then extract the first few items from each
ORA-06575: the package or function NO_VM_DROP_PROC is invalid, wndproc FunctionSQL> drop user aaa; Drop user aaa ORA-00604: recursive SQL Level 1 errorORA-06575: the package or function NO_VM_DROP_PROC is invalidORA-06512: In line 21 SQL> alter
Oracle modifies the field type and length, and oracle modifies the field
Modify the field name in Oracle
Alter table name rename column old field name to new field name
Modify the field type and length in Oracle
Alter table name modify Field
Oracle transaction processing and instance demonstration jdbc operation batch Delete, oraclejdbc
Transactions
As the basic unit of logical processing, database operations are composed of one or more SQL statements. Of course, there are also
Understanding of checkpoint not completed, checkpoint
Assume that the database has two log groups: log1 and log2. First, --> log1 --> log2 --> log1. At this time (log2 switches to log1), the checkpoint will be flush dirty block to datafile, this
Wait for the event log to wait for the event solution.
I insisted on reading three sets of RAC AWR every day and summarized it.
Query the SQL statement of the log wait event:
9i: select * from v $ event_name where name like '% log %'; (about 14)10g:
OTL Chinese garbled OTL UTF8, otl Chinese garbled utf8
Character encoding is supported by odbc when unixODBC is used to connect to MySQL. It does not require any compilation conditions when compiling OTL in C ++.
If your database uses UTF-8
Mysql optimization and mysql OptimizationMysql Optimization
I 've been writing a blog on csdn for a long time. Recently, I 've been learning mysql optimization at Yan 18, and this teacher is still talking about it, today, I just have time to
Basic concepts of data structures
Data element: a basic unit that makes up data and has a certain significance. It is usually processed as a whole in a computer, also known as a record.
Data items: a data element can contain several data items.
Grant authorization for Oracle cainiao and oraclegrant
1. Authorize the database user (the object is the user table) GRANT privilege [,...] ON object [,...] TO {PUBLIC | GROUP group | username} privilege: select: Query insert: insert update: update
Single-line functions (Chapter Summary), Chapter Summary1. single-row functions can complete many independent small functions.2. The main function of a character function is to process string data, such as converting a string into uppercase,
Oracle histogram, Histogram
Histogram when the data distribution of a column is uneven, in order to allow CBO to generate the best execution plan, we may need to collect a histogram for the table. The maximum number of buckets in the histogram is 254
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