Python operates the sqlite database, the data is emptied, but the size of the database remains the same.

question

use python to manipulate the sqlite database and save the crawled data in the sqlite database. But each time you empty the data in the data table, the size of the database does not decrease, so the larger the database will be, what is going on?

Mar.06,2021

disks that perform data deletion will be added to the free list and will not return disk space to the operating system
solution: run the VACUUM command to clear the free list

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30413-2bd01.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30413-2bd01.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?