[sqlite] SQLite triggers messages

2008-07-13 Thread Alexey Pechnikov
Hello! I try this code create trigger view_objects_update before update on view_objects begin select RAISE (ABORT,'Row id=' || NEW.id); end; but get "SQL error: near "||": syntax error". How can I do it? Best regards, Alexey. ___ sqlite-users maili

[sqlite] COUNT() on indexed tables / primary key with 100'000 records

2008-07-13 Thread [EMAIL PROTECTED]
Hello I have following table with around 100'000 rows / ~10MB on a embedded device: CREATE TABLE 'fs_main' ( 'fs_recid' INTEGER PRIMARY KEY NOT NULL, 'fs_contenttype' INTEGER, 'fs_itemtype' INTEGER, 'fs_job' INTEGER, 'fs_textid' TEXT,<- ~5 chars per Record 'fs_flag1' IN

Re: [sqlite] SQLite 3.6.0 coming soon...

2008-07-13 Thread Virgilio Fornazin
Thanks for your quick answer... I'll take a look at it to see and submit a patch to cvstrac if needed. Also, thanks again for this great library. On Sun, Jul 13, 2008 at 12:47 AM, D. Richard Hipp <[EMAIL PROTECTED]> wrote: > > On Jul 12, 2008, at 5:34 PM, Virgilio Fornazin wrote: > > > These mut

Re: [sqlite] COUNT() on indexed tables / primary key with 100'000records

2008-07-13 Thread Igor Tandetnik
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have following table with around 100'000 rows / ~10MB on a embedded > device: > > CREATE TABLE 'fs_main' ( > 'fs_recid' INTEGER PRIMARY KEY NOT NULL, > 'fs_contenttype' INTEGER, > 'fs_itemtype' INTEGER, > 'fs_job' INTEGER, > 'fs_textid

[sqlite] Efficiency question about LIMIT

2008-07-13 Thread Csaba
If I have a table and I run a query against it with a LIMIT 1000 clause, then presumably once 1000 rows matching the query have been found, SQLite can return. Does this change if I have an ORDER BY clause that does not match any index? If it does match an index, will SQLite be clever enough to us

Re: [sqlite] Efficiency question about LIMIT

2008-07-13 Thread Igor Tandetnik
"Csaba" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > If I have a table and I run a query against it with a LIMIT 1000 > clause, then presumably once 1000 rows matching the > query have been found, SQLite can return. I'm not sure what you mean by "can return". You get one row for e

Re: [sqlite] Efficiency question about LIMIT

2008-07-13 Thread D. Richard Hipp
On Jul 13, 2008, at 11:37 AM, Igor Tandetnik wrote: >> >> Does this change if I have an ORDER BY clause that does >> not match any index? > > No (though it would take longer to get the first row, as SQLite will > have to retrieve and sort all the records first). If a query has both a LIMIT and a

Re: [sqlite] COUNT() on indexed tables / primary key with 100'000records

2008-07-13 Thread [EMAIL PROTECTED]
Hello Lets say i have 120'000 records and worst case is that upto 90'000 records match the conditions. Daniel Ursprüngliche Nachricht Von: [EMAIL PROTECTED] Datum: 13.07.2008 17:16 An: Betreff: Re: [sqlite] COUNT() on indexed tables / primary key with 100'000records <[EMAIL PRO

Re: [sqlite] COUNT() on indexed tables / primary keywith 100'000records

2008-07-13 Thread Igor Tandetnik
<[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Lets say i have 120'000 records and worst case is that upto 90'000 > records match the conditions. Well, if you count almost all records, why do you expect the query to run substantially faster than the one that in fact counts all reco

[sqlite] partial search matches using FTS

2008-07-13 Thread Rael Bauer
Hi,   Is it possible to obtain partial matches to a search term using the fts search?   E.g. field data contains: apple Search term: app will return a match (optionally with match info).   If not, please add this as a feature request :).   Thanks Rael __

Re: [sqlite] partial search matches using FTS

2008-07-13 Thread Stephen Woodbridge
Rael Bauer wrote: > Hi, > > Is it possible to obtain partial matches to a search term using the fts > search? > > E.g. field data contains: apple > Search term: app > will return a match (optionally with match info). > > If not, please add this as a feature request :). MATCH 'app*' should

[sqlite] subject

2008-07-13 Thread dongsheng zhang
sqlite-users-request, Hello dongsheng zhang, [EMAIL PROTECTED] 2008-07-14 - Receiving the following content - From: sqlite-users-request Receiver: sqlite-users Time: 2008-07-14, 00:00:03 Subject: sqlite-users Digest, Vol 7, Issue 43 Send sqlite-users mailing list submissions to s

Re: [sqlite] COUNT() on indexed tables / primary keywith 100'000records

2008-07-13 Thread [EMAIL PROTECTED]
Hello Thank you for you quick responses. If I disable the index with + it takes around 50% more execution time. I supposed a very fast query even with many records, because COUNT( ) might do its work on the index only. I this case, I have to find another solution to get the number of records