Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

A few small knowledge points about redo

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

About redo, may not know a little knowledge, I do not know whether the summary is right, but first sum up it.

1. The power loss of the host will cause the instance to fail, and the instance needs to be restored when the db is restarted.

2. When the instance is restored, oracle can restore the system to the moment when the instance fails according to the redo log.

3. Generally speaking, the situation in which undo can be used is the rollback when we perform rollback or restore.

4. Manual management of undo segments requires us to manually create or delete undo segments, and when we automatically manage undo, oracle will automatically create or destroy undo segments.

5. When rolling back, oracle applies undo to the data block and index block to restore the data block and index block. If blocks and index blocks have been written to disk at this point (large transactions), oracle will read those blocks into the cache and then apply undo rollback.

6. When you roll back, you don't need to read redo,redo. It's just for recovery and archiving.

7. Cost of commit:

Will increase communication with the database.

Commit waits for redo to write to disk and the wait event is log file sync.

8. When a transaction occurs, undo blocks, modified blocks, and redo blocks cached for the first two items are generated in SGA.

9. Each commit,scn will be added by 1.

10. The influence of trigger on redo

DML operation AFTER BEFOR AFTER BEFORE

(before 10g) (10g) (10g)

DELETE does not affect

INSERT increases redo increases redo constant redo constant redo

UPDATE increase redo does not affect increase redo increase

11. When db is in nologg mode, ddl is hardly recorded as redo. If redo is produced, it is also generated to protect updated data dictionaries.

12. We can set the nologging mode on the index, so if we rebuild the index, it will shorten the time.

13. When insert, the temporary table hardly produces redo, but it will produce undo, and when it generates undo, it will generate redo corresponding to undo, so the temporary table will only produce quite a small amount of redo. In delete, the temporary table produces as much redo as the ordinary table, and the temporary table produces half the redo of the ordinary table in update.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report