>Estimated cost and row for each call to xBestIndex (sqlite3_index_info is
>filled with the below values for each call)
>
>a) When there is one non-usable constraint
> idxNum = 0 estimatedCost = 1000.00 estimatedRows = 1000
>
>b) when there is one usable constraint
>idxNum = 1
>> I am expecting two usable entries in sqlite3_index_info with
>> aConstraint[i].iColumn = 0 and aConstraint[i].op ==
>> SQLITE_INDEX_CONSTRAINT_EQ for each check
>
> What actually happens is that SQLite transforms the query into
>
>SELECT stamp, to_text(value) FROM store WHERE id IN
corresponds to the first call to xBestIndex. Thus it
does a table scan to find entries (42, 24)
Am i missing something here ?
-venkat murty
Fiberlink Disclaimer: The information transmitted is intended only for the
person or entity to which it is addressed and may contain confidential
The visibility of table created in with clause is only in the SET part.
The following is a valid sql statement in sqlite3.
with ds as (select id, a , b, c from some_table where c = 43)
update temp_table set id = (select ds.id from ds where ds.a = temp_table.a AND
ds.b = temp_table.b),
some_table where c = 42)
update temp_table set id = ds.id, operation = 'UPDATE'
WHERE ds.a = temp_table.a AND ds.b = temp_table.b;
I get the error " no such column: ds.id"
Thanks,
Venkat Murty
Fiberlink Disclaimer: The information transmitted is intended only for the
person or entit
5 matches
Mail list logo