Re: [sqlite] Problem: Index not used with ORDER BY on view

2012-10-24 Thread Scholz Maik (CM-AI/PJ-CF42)
TCP, CM-AI/PJ-CF42); Erben Peter (CM-AI/PJ-CF42) Betreff: Re: [sqlite] Problem: Index not used with ORDER BY on view On Wed, Oct 24, 2012 at 4:59 AM, Scholz Maik (CM-AI/PJ-CF42) < maik.sch...@de.bosch.com> wrote: > Hi, > I have some strange behavior with the query optimizer. > >

[sqlite] Problem: Index not used with ORDER BY on view

2012-10-24 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, I have some strange behavior with the query optimizer. SQLite version 3.7.7.1 2011-06-28 17:39:05 sqlite> create table t1 (a,b); sqlite> insert into t1 (a,b) values (1,2); sqlite> insert into t1 (a,b) values (3,4); sqlite> select * from t1; 1|2 3|4 sqlite> create index i1 on t1(a); sqlite>

[sqlite] Index not used in query

2012-09-20 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, I have a problem with a missing use of an index. My Example: sqlite> create table tab1 (o INT, a INT, b INT,UNIQUE(o,b)); sqlite> select * from sqlite_master; table|tab1|tab1|2|CREATE TABLE tab1 (o INT, a INT, b INT,UNIQUE(o,b)) index|sqlite_autoindex_tab1_1|tab1|3| => I expect that th

[sqlite] Problem and possible Optimiziation with LOOKASIDE buffer

2012-02-09 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, I am working on an embedded application using SQLite. My lookaside configuration: sqlite3_db_config(mydbhandle, SQLITE_DBCONFIG_LOOKASIDE, 0, 64, 128); After doing some profiling, I saw that sqlite3DbMallocRaw does not allocate fr

[sqlite] sqlite3_changes()!=0 after UPDATE OR IGNORE without change

2012-02-08 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, I have some problem with my understanding of "UPDATE OR IGNORE" and the sqlite3_changes() function. My expectation is, that changes() gives the number of changed rows. When I use "UPDATE OR IGNORE" with same data, so no data change is needed, I expect that the number of changes is null. I a

[sqlite] SQL-Beginner question about filtering

2011-08-25 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, I am little bit confused about filtering SQL query's. My table: ROWID V A B === 1 0 0 1 2 0 0 2 3 0 1 1 4 0 1 2 5 1 0 2 6 2 0 2 With my SQL knowledge I am

[sqlite] Official replacement for sqlite3_expire

2011-08-17 Thread Scholz Maik (CM-AI/PJ-CF42)
Hi, I like to use and reuse SQLite statements. I need a way to detect, when a statement is obsolete because e.g. the schema was changed. So sqlite3_expire is marked deprecated, what shall I use instead? Maik ___ sqlite-users mailing list sqlite-users@s