Re: [sqlite] Sorting by rowid needs temp b-tree?

2011-12-04 Thread Igor Tandetnik
Nikolaus Rath wrote: > After creating another index, it seems to work: > > sqlite> create index foo on contents(parent_inode); > sqlite> explain query plan SELECT name_id, inode, rowid FROM contents WHERE > parent_inode=42 AND rowid > 12932 ORDER BY rowid; > 0|0|0|SEARCH TABLE contents USING IND

Re: [sqlite] Sorting by rowid needs temp b-tree?

2011-12-04 Thread Nikolaus Rath
"Igor Tandetnik" writes: > Nikolaus Rath wrote: >> Hello, >> >> sqlite> explain query plan SELECT name_id, inode, rowid FROM >> contents WHERE parent_inode=42 AND rowid > 12932 ORDER BY rowid; >> 0|0|0|SEARCH TABLE contents USING INDEX sqlite_autoindex_contents_1 >> (parent_inode=?) (~6 rows) 0|

Re: [sqlite] union-having bug

2011-12-04 Thread Igor Tandetnik
Gillman, David wrote: > Is this expected behavior? (The failure of my query to return a row.) Your query does not have a well-defined meaning, so no particular behavior is expected from it. -- Igor Tandetnik ___ sqlite-users mailing list sqlite-user

Re: [sqlite] union-having bug

2011-12-04 Thread Gillman, David
Is this expected behavior? (The failure of my query to return a row.) David -Original Message- From: Kit [mailto:kit.sa...@gmail.com] Sent: Saturday, December 03, 2011 5:24 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] union-having bug 2011/12/3 Gillman, David :

Re: [sqlite] Sorting by rowid needs temp b-tree?

2011-12-04 Thread Igor Tandetnik
Nikolaus Rath wrote: > Hello, > > sqlite> explain query plan SELECT name_id, inode, rowid FROM contents WHERE > parent_inode=42 AND rowid > 12932 ORDER BY rowid; > 0|0|0|SEARCH TABLE contents USING INDEX sqlite_autoindex_contents_1 > (parent_inode=?) (~6 rows) > 0|0|0|USE TEMP B-TREE FOR ORDER

[sqlite] Sorting by rowid needs temp b-tree?

2011-12-04 Thread Nikolaus Rath
Hello, sqlite> explain query plan SELECT name_id, inode, rowid FROM contents WHERE parent_inode=42 AND rowid > 12932 ORDER BY rowid; 0|0|0|SEARCH TABLE contents USING INDEX sqlite_autoindex_contents_1 (parent_inode=?) (~6 rows) 0|0|0|USE TEMP B-TREE FOR ORDER BY Why does ordering by rowid need

Re: [sqlite] RE Infinite Loop in MATCH on self written fts3 tokenizer

2011-12-04 Thread Johannes Krude
hi, On Sunday 04 December 2011 14:23:09 Black, Michael (IS) wrote: > It says "here's token 'hal'" and if you return the pointer to "h" it points > to the same place so it returns "hal" right back to youergo the loop. I have read through the ext/fts3/fts3/expr.c code and found out the following

[sqlite] RE Infinite Loop in MATCH on self written fts3 tokenizer

2011-12-04 Thread Black, Michael (IS)
Because tokenizers expect the pointer to increment and you're apparently not doing that. It says "here's token 'hal'" and if you return the pointer to "h" it points to the same place so it returns "hal" right back to youergo the loop. I think you would have to maintain state and your ow

Re: [sqlite] Help with an SQL statement

2011-12-04 Thread Adolfo Jiménez Millán
Problem solved: a). I was using an old test directory with version 3.5.4 of sqlite3.exe, hence the errors in the condition (I suppose). b) Once updated to the 3.7.9 version, and went away the syntax errors, I mistakenly believed that the sentence did not produce any results because the dBase f