A method for recording a transaction log, and a database engine, and pertains to the field of database technologies. The method includes receiving an structured query language (SQL) request; modifying, according to the SQL request, a data page corresponding to the SQL request; generating a corresponding transaction log for the modifying; partitioning the transaction log to obtain a plurality of log segments; and writing the plurality of log segments into a plurality of log buffers, and writing the log segments in the plurality of log buffers into a log file in parallel. According to the present invention, not only lock granularities of the log buffers of the transaction log are reduced, but also a speed at which a log file is written into a magnetic disk is greatly increased, thereby improving performance of a database system and enhancing user experience.
展开▼