Today, the Autumn Park QBlog data to guide Oracle to run, to regain Oracle, under the main problems in the process of the record:
1: Service Startup Problems
2: indexing problems
Guide to Oracle data, we found that some simple change quite slow query such as:
select id,username,title from blog_content where userid=111 order by id desc
But then, through point of pulling the page, plus an index to the title on the fast: "select the place that contains the index (oracle said in a covering index)"
then other queries slow, all indexed to speed it up, it seems to engage in Oracle not to engage in the index, there is no way to play.
3: sub-query problem
Normal Code:
(SELECT count(*) FROM Blog_Content WHERE TypeID=0) as ArticleCount
FROM Blog_User
This statement were normal in Access, Mssql, Sqlite, Mysql, Oracle is not alone, add a function to solve the following:
SELECT count(*) as UserCount,
min((SELECT count(*) FROM Blog_Content WHERE TypeID=0)) as ArticleCount
FROM Blog_User
4: stored procedure call problem
problem:
If executed in PL / SQL, and wrong.
The solution is empty, the transfer DBNull.Value.
5: perfect CYQ.Data for the Oracle version of the page stored procedure.
Directly modify the article: toss Oracle dishes question in mind [paging stored procedure / query all the tables, views, stored procedures / query tables, views, stored procedures, field structure and parameters] (c)
6: Modify Field Order
Adding columns, I do not want to put the final surface, pull up, and had to write code to change the sequence number.
select object_id from all_objects where object_name = ' BLOG_COMMENT' - lookup ID
SELECT COL #, name from SYS.COL WHERE obj $ # = sequence number field look 49244--
update sys.col $ set COL # = 8 where obj # = 49244 and name = 'CREATETIME' - Update the number of
7: Update sequence initial value
A common database for the increment sequence ID, serial data End guide value has not changed, the value needs to be adjusted.
ALTER SEQUENCE sequence name Increment new digital By;
Reproduced in: https: //my.oschina.net/secyaher/blog/274274