Re: [sqlite] sqlite3 last insert rowid

2013-02-25 Thread Hick Gunter
No. It returns the value of the (hidden) column rowid. -Ursprüngliche Nachricht- Von: Ashok Pitambar [mailto:ashokpitam...@gmail.com] Gesendet: Dienstag, 26. Februar 2013 08:51 An: sqlite-users@sqlite.org Betreff: [sqlite] sqlite3 last insert rowid Hi All, Does function

[sqlite] sqlite3 last insert rowid

2013-02-25 Thread Ashok Pitambar
Hi All, Does function sqlite3_last_insert_rowid returns the composite key if created with 2 columns? Thanks Regards, Ashok ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] like query

2013-02-25 Thread dd
>>SELECT * FROM emp WHERE column_test BETWEEN "somedata/" AND "somedata/zzz" This database has unicode strings(chinese/japanese/...etc strings). can you tell me which is the correct character to replace with z? On Mon, Feb 25, 2013 at 8:13 PM, Simon Slavin wrote:

Re: [sqlite] like query

2013-02-25 Thread dd
Thanks Richard. On Mon, Feb 25, 2013 at 6:54 PM, Richard Hipp wrote: > On Mon, Feb 25, 2013 at 9:46 AM, dd wrote: > > > Hi, > > > > Table has string data type column. format of strings: > > somedata1/somedata2/somedata3 > > > > I have written query

Re: [sqlite] locked database returning SQLITE_IOERR, not SQLITE_BUSY

2013-02-25 Thread Greg Janée
Have you set a SQLite timeout of a few seconds ? See here: I was expecting to get SQLITE_BUSY and nothing else. If the _BUSY state lasts for longer than the timeout you've set, then you'll get _IOERR. Setting a long timeout gives the

Re: [sqlite] SQLite equivalent to Oracle's MERGE INTO

2013-02-25 Thread Petite Abeille
On Feb 25, 2013, at 11:54 PM, anydacdev anydacdev wrote: > I was wondering what is SQLite's equivalent to: > > MERGE INTO x TGT There is none. Even though it's standard SQL (SQL:2003 or such), this is not supported by SQLite in any way, shape, or form. One could make do

Re: [sqlite] SQLite equivalent to Oracle's MERGE INTO

2013-02-25 Thread Igor Tandetnik
On 2/25/2013 5:54 PM, anydacdev anydacdev wrote: I was wondering what is SQLite's equivalent to: MERGE INTO x TGT USING (SELECT NAME, KEY FROM y) SRC ON (TGT.key = SRC.key) WHEN MATCHED THEN UPDATE SET TGT.NAME = NAME WHEN NOT MATCHED THEN INSERT (TGT.NAME) VALUES (SRC.NAME) If x.key

[sqlite] SQLite equivalent to Oracle's MERGE INTO

2013-02-25 Thread anydacdev anydacdev
I was wondering what is SQLite's equivalent to: MERGE INTO x TGT USING (SELECT NAME, KEY FROM y) SRC ON (TGT.key = SRC.key) WHEN MATCHED THEN UPDATE SET TGT.NAME = NAME WHEN NOT MATCHED THEN INSERT (TGT.NAME) VALUES (SRC.NAME) Thanks. ___

Re: [sqlite] locked database returning SQLITE_IOERR, not SQLITE_BUSY

2013-02-25 Thread Simon Slavin
On 25 Feb 2013, at 10:22pm, Greg Janée wrote: > I'm accessing an SQLite database from two processes simultaneously. If > there's contention, one process will receive an SQLITE_BUSY; that's fine. > However, occasionally a process will receive an SQLITE_IOERR with the >

Re: [sqlite] [SQLite.ADO.Net] Upgrading XP to SQLite version?

2013-02-25 Thread Simon Slavin
On 25 Feb 2013, at 2:18pm, Gilles Ganault wrote: > I'm running the 32-bit version of XPSP3, whose "Add and Remove > Programs" show that I have "QQLite ADO.NET 2*0/3.5 Provider 1.065.0" > from Phoenix Software Solutions, LLC (http://sqlite.phxsoftware.com). > > Now

[sqlite] locked database returning SQLITE_IOERR, not SQLITE_BUSY

2013-02-25 Thread Greg Janée
I'm accessing an SQLite database from two processes simultaneously. If there's contention, one process will receive an SQLITE_BUSY; that's fine. However, occasionally a process will receive an SQLITE_IOERR with the extended result code SQLITE_IOERR_LOCK. This seems to occur if the other

Re: [sqlite] [SQLite.ADO.Net] Upgrading XP to SQLite version?

2013-02-25 Thread Gilles Ganault
On Mon, 25 Feb 2013 15:18:17 +0100, Gilles Ganault wrote: >When do we need the design-time components? Which package should I use >for development + deployment onto users' host? I'm not clear about which package to install on a development host, and which to install on a

Re: [sqlite] minor typos in lang_corefunc.html's description of abs(X). domain of abs(X)

2013-02-25 Thread Igor Tandetnik
On 2/25/2013 10:53 AM, Eric Rubin-Smith wrote: Minor typos aside, it's interesting that SQLite is nice enough to convert integers strictly less than -1 * 2^63 to floats and then take the floating absolute value. There are no 64-bit signed integers (which is the only integral type SQLite deals

Re: [sqlite] like query

2013-02-25 Thread Simon Slavin
On 25 Feb 2013, at 2:46pm, dd wrote: > Table has string data type column. format of strings: > somedata1/somedata2/somedata3 > > I have written query to search : select * from emp where column_test like > "somedata/%"; > > It gives perfomance as per articles in

[sqlite] minor typos in lang_corefunc.html's description of abs(X). domain of abs(X)

2013-02-25 Thread Eric Rubin-Smith
"The abs(X) function returns the absolute value of the numeric argument X. Abs(X) returns NULL if X is NULL. Abs(X) return 0.0 if X is a string or blob that cannot be converted to a numeric value. If X is the integer -9223372036854775807 then abs(X) throws an integer overflow error since there is

Re: [sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Gabriel Corneanu
That's why I asked about feedback. My implementation is ~100 lines longer, so I think it's still "lite". There is nothing complex in it; apart from heap implementation, there are quite a few simplifications in the original code. Gabriel ___

Re: [sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Gabriel Corneanu
I thought more about a "minus" (subtract minimum), but this might be a better option. Regards, Gabriel ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Re: [sqlite] like query

2013-02-25 Thread Richard Hipp
On Mon, Feb 25, 2013 at 9:46 AM, dd wrote: > Hi, > > Table has string data type column. format of strings: > somedata1/somedata2/somedata3 > > I have written query to search : select * from emp where column_test like > "somedata/%"; > > It gives perfomance as per

[sqlite] like query

2013-02-25 Thread dd
Hi, Table has string data type column. format of strings: somedata1/somedata2/somedata3 I have written query to search : select * from emp where column_test like "somedata/%"; It gives perfomance as per articles in internet. Is it? If yes, what is alternate query for this? Thanks in

[sqlite] Error opening encrypted databases in multiple threads

2013-02-25 Thread Thomas Müller
We are using a bunch of encrypted SQLite databases and occasionally we get some errors with different error codes on SQLiteConnection.Open or SQLiteCommand.ExecuteReader(). This does not happen when the databases are not encrypted or if any database actions have been successfully done before.

[sqlite] [SQLite.ADO.Net] Upgrading XP to SQLite version?

2013-02-25 Thread Gilles Ganault
Hello I'm running the 32-bit version of XPSP3, whose "Add and Remove Programs" show that I have "QQLite ADO.NET 2*0/3.5 Provider 1.065.0" from Phoenix Software Solutions, LLC (http://sqlite.phxsoftware.com). Now that SQLite.Ado.Net is handled by www.slite.org, what is the right way to

Re: [sqlite] Do not read File change counter

2013-02-25 Thread Richard Hipp
On Mon, Feb 25, 2013 at 8:46 AM, Joost Voogt wrote: > Apparently I did something wrong the first time when I tried the exclusive > lock because now I don't see SQLite reading the file change counter > anymore. Sorry for that. > > I did some performance measurement on an FTS

Re: [sqlite] Do not read File change counter

2013-02-25 Thread Joost Voogt
Apparently I did something wrong the first time when I tried the exclusive lock because now I don't see SQLite reading the file change counter anymore. Sorry for that. I did some performance measurement on an FTS index on Android and I see some performance gain of around 5%. That is a nice gain

Re: [sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Ryan Johnson
On 25/02/2013 7:24 AM, Simon Slavin wrote: On 25 Feb 2013, at 11:33am, Howard Chu wrote: Gabriel Corneanu wrote: Following a few other discussions, I had the feeling that sqlite should benefit from a cache which discards cached pages in a least frequently used order. Just

Re: [sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Hick Gunter
Just before the first fetch counter overflows, right shift all counters by 1. This does not change the purge order, keeps the counters in limits and happens infrequently (depending on the size of the counter). -Ursprüngliche Nachricht- Von: Gabriel Corneanu

Re: [sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Howard Chu
Simon Slavin wrote: On 25 Feb 2013, at 11:33am, Howard Chu wrote: Gabriel Corneanu wrote: Following a few other discussions, I had the feeling that sqlite should benefit from a cache which discards cached pages in a least frequently used order. Just offhand, classical LRU

Re: [sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Simon Slavin
On 25 Feb 2013, at 11:33am, Howard Chu wrote: > Gabriel Corneanu wrote: >> Following a few other discussions, I had the feeling that sqlite should >> benefit from a cache which discards cached pages in a least frequently >> used order. > > Just offhand, classical LRU is quite

Re: [sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Gabriel Corneanu
I'm not sure we're talking about the same thing. For me caching here means avoiding IO, not memory and/or locks. The heap itself also needs some work, but logarithmic. The default value of 2000 pages cache should me enough for most useful pages (indices, roots...), having an overhead of max ~11

Re: [sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Howard Chu
Gabriel Corneanu wrote: Following a few other discussions, I had the feeling that sqlite should benefit from a cache which discards cached pages in a least frequently used order. Just offhand, classical LRU is quite poor in terms of lock overhead. The CLOCK refinement scales much better,

[sqlite] experimental (better?) usage based sqlite cache

2013-02-25 Thread Gabriel Corneanu
Following a few other discussions, I had the feeling that sqlite should benefit from a cache which discards cached pages in a least frequently used order. It generally means, index pages, often used data pages, etc, should be preferred (meaning kept in memory) compared to some infrequent used