> The SQLite I have here uses the primary key.
It works now after another round of drop index/create index/analyze.
The problem is/was related to the DB, I have multiple databases with the
same schema, only the largest one had the issue (38 GB), the smaller ones
did not.
> Which version?
While
Eric Grange wrote:
> I recently added a field and index to an existing table, and now SQLite
> seems to be using that index in place of the primary key, even on simple
> queries
>
> CREATE TABLE vin (
>id INTEGER PRIMARY KEY AUTOINCREMENT,
>tx_id INTEGER NOT NULL,
>from_vout_id
Also while using
select id from vin NOT INDEXED order by id desc limit 1
works around the problem, this is just one query of many (and a simplified
one at that), and I have other less trivial queries where the inefficient
default query plan has the same catastrophic effect on performance, so
Hi,
I recently added a field and index to an existing table, and now SQLite
seems to be using that index in place of the primary key, even on simple
queries
Table declaration:
CREATE TABLE vin (
id INTEGER PRIMARY KEY AUTOINCREMENT,
tx_id INTEGER NOT NULL,
from_vout_id INTEGER,
4 matches
Mail list logo