BLOCKED
error code.count
, avg
, min
, max
, and sum
results in a row scan for every row considered in the aggregation.
ALTER TABLE
and Row ReadsALTER TABLE
operations, especially those rewriting row contents, necessitate a full table scan, incurring a read for each table row. However, not all ALTER TABLE
actions, like DROP COLUMN
, lead to full scans. Be mindful of potential row writes as well.
dbstat
and those with sqlite_
prefix, don’t incur row reads in queries.
select 1
, default to one row read.
ALTER TABLE
and Row WritesALTER TABLE
operations can result in a row write for each existing row, especially if the row data is altered during the process. It’s important to understand how different types of ALTER TABLE
statements impact row writes.
ALTER TABLE
actions may also lead to row reads, adding another layer to consider when modifying table structures.dbstat
to calculate the total space used by all tables and indexes. The base unit for this measurement is a database file page, which is 4KB.
VACUUM
command is a common tool for optimizing storage by compacting the database. However, it’s important to note that this command is currently disabled in Turso. Future updates may introduce options for developers to efficiently manage and reduce the total storage footprint of their databases.EXPLAIN QUERY PLAN
statement to gain insights into your query’s execution plan. This tool is invaluable for identifying whether your query is performing a full table scan and if it’s leveraging the most efficient index to reduce unnecessary reads.