Foreword: It is usually difficult to recover the data after accidentally deleting the data during the truncate operation. Because the truncate operation is a ddl operation, the data cannot be restored using the direct undo flashback query method. Moreover, due to the space size, backup time, and non-standard change operations, it is often not possible […]
Tag: truncate
Solve OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof = 0
Table of Contents Solve OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof = 0) error wrong reason solution Precaution Application scenarios Causes and precautions for file truncation or damage reason: Precautions: Solve OSError: Unable to open file (truncated file: eof = 8388608, sblock->base_addr = 0, stored_eof = 0) error […]
LightDB (13.8-23.3) supports ALTER TABLE name TRUNCATE PARTITION partition_name update indexes syntax
Common range partition table create table test_part_update_indexes_range(id int primary key) PARTITION by range(id)( partition p1 VALUES LESS THAN (202000) nocompress, partition p2 VALUES LESS THAN (202001) compress, partition p3 VALUES LESS THAN (202002) ); ALTER TABLE test_part_update_indexes_range TRUNCATE PARTITION p1; drop table test_part_update_indexes_range; create table test_part_update_indexes_range(id int primary key) PARTITION by range(id)( partition p1 VALUES […]
Is there any difference between truncate and delete of SQLSERVER?
One: Background 1. Tell a story In the interview, I believe that many friends will be asked what is the difference between truncate and delete, this is a very interesting topic, I will try to answer this article, if next time you encounter My answer to this kind of question should help you get through […]
[mysql table partition system] use DROP PARTITION syntax and TRUNCATE PARTITION carefully for mysql table partition
First of all, let me declare that the mysql version I use here is version 5.7.29. Of course, the following questions are also based on this version. Because there is no research on whether other versions will have these problems, you can check the information in the official documents Why do you say that you […]
[Opencv] PIL Opencv writes text to the picture and rotates the text, Opencv picture rotation does not truncate, Opencv picture rotation does not crop
Article directory distortion Implementation of Pillow Implementation of Opencv Rotate image without cropping Rotate text and map C++ picture perspective transformation Distortion Rigid transformation: Only the position (translation transformation) and orientation (rotation transformation) of the object change, but the shape remains unchanged. The obtained transformation is called rigid transformation. Rigid transformations are the most general […]
Why exactly is the TRUNCATE statement slow?
The author analyzes the reasons and solutions for the slow SQL formed by the truncate statement through the source code, and compares it with MySQL 5.7 on the relevant implementation logic. Problem phenomenon Received feedback that when a test environment executes batch operations, there are truncate statements in the slow query log. I am worried […]
Why exactly is the TRUNCATE statement slow?
Directory problem phenomenon key configuration Problem Analysis Summary Q1: How is the TRUNCATE statement executed? The fd handle doesn’t change? Why is the execution time long? How is the TRUNCATE statement executed? Why doesn’t the handle change? Q2: How to analyze the problem of slow TRUNCATE? Method 1: Slow log? Method 2: Execute the plan? […]
The root cause of slow query caused by truncate turned out to be “overwhelming”
Basic information: An online library 5.7.25 often has a large number of slow queries. When it reappears, log in to the database for analysis. Through the content of show engine innodb status, all sending threads are waiting for a lock. This lock is most likely caused by this truncate table action: —TRANSACTION 4764270793, ACTIVE 12 […]
python wannier90 Select truncated hopping based on wannier90’s *_hr.dat file to draw energy band diagram
We know that wannier90 can generate a detailed hopping energy *_hr.dat file based on the orbital information of the selected TMDs. It is relatively simple to select all the hopping and draw them, but we found that the band can also be expressed by taking a few rounds of approximate hopping, similar Ideas include Pybinding’s […]