Re: [sqlite] Problem with FTS4 - Floating point error.

2011-10-24 Thread Mohd Radzi Ibrahim
On 18-Oct-2011, at 6:52 PM, Dan Kennedy wrote: > > > On 10/18/2011 05:02 PM, Mohd Radzi Ibrahim wrote: >> Hi, >> >> This is my table schema: >> >> CREATE VIRTUAL TABLE LocationFTS using FTS4 >> ( >> name text, >> address text, >> email text, >> remark text, >> telno

Re: [sqlite] EXT :Re: Concurrent readonly access to a large database.

2011-10-24 Thread Frank Missel
> boun...@sqlite.org] On Behalf Of Bo Peng > > I will do this multiple times, with different conditions (e.g. SELECT > MAX(c) FROM TABLE_X WHRE b > 1.0) so maintaining number of rows would > not help. I intentionally avoided TRIGGERs because of the large amount > (billions) of data inserted. > >

[sqlite] Potential bug: "insert into X select * from Y" ignores the "ON CONFLICT REPLACE" conflict-clause

2011-10-24 Thread Simon L
To reproduce this problem, enter the following 5 SQL statements at the SQLite command line. create table X(id INTEGER primary key ON CONFLICT REPLACE); create table Y(id INTEGER primary key ON CONFLICT REPLACE); insert into X values (1); insert into Y select * from X; insert into Y select * from

Re: [sqlite] C API docs

2011-10-24 Thread Simon Slavin
On 25 Oct 2011, at 2:40am, Richard Hipp wrote: > On Mon, Oct 24, 2011 at 9:05 AM, Baruch Burstein wrote: > >> How are the C API documents auto-generated? Which tool is used? >> I see that they are all in the comments in the code, but couldn't find a >> tool in the source

Re: [sqlite] sqlite3 Performance Linux x86_64, MacOSX Snow Leopard

2011-10-24 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 24/10/11 13:23, Volker Jahns wrote: > Any help is greatly appreciated on how to solve this issue. You have given no way for anyone else to try to repeat the issue. We can't see your source code and it is unlikely your benchmark is the first to

Re: [sqlite] C API docs

2011-10-24 Thread Richard Hipp
On Mon, Oct 24, 2011 at 9:05 AM, Baruch Burstein wrote: > How are the C API documents auto-generated? Which tool is used? > I see that they are all in the comments in the code, but couldn't find a > tool in the source that is used to extract them and make the links. > The

Re: [sqlite] Order by creating function is not sorting for input order and alphabet

2011-10-24 Thread David Garfield
Suggestions: 1) Try: select cli_id, antok(cli_id) as antok_cli_id .. order by antok_cli_id This should at least show you exactly what it thinks it sorted. 2) Don't do regcomp() more than once. It can be very costly. And cache input.c_str() and input.length() while you are at it.

Re: [sqlite] Order by creating function is not sorting for input order and alphabet

2011-10-24 Thread Igor Tandetnik
On 10/24/2011 8:19 PM, ChingChang Hsiao wrote: case SQLITE_INTEGER: sqlite3_result_int64( context, sqlite3_value_int64(argv[0]) ); break; case SQLITE_NULL: sqlite3_result_null( context ); break; If you want to just return an argument unchanged, you can use

[sqlite] Order by creating function is not sorting for input order and alphabet

2011-10-24 Thread ChingChang Hsiao
The purpose of function antok is that solve the problem of "order by cli_id". Function antok converts, X86-1 -> x186-01 X86-2 -> x186-02 X86-10 -> x186-110 X86-111 -> x186-2111 X86- -> x186-3 1.1/12-ds3 -> 01.01/112-ds03 Examples, Input cli_id x86-2, x86-10, x86-1 Order by cli_id

Re: [sqlite] sqlite3 Performance Linux x86_64, MacOSX Snow Leopard

2011-10-24 Thread Volker Jahns
Updating timestamp attributes 32-Bit vs. 64-Bit performance There is an issue concerning the 32-Bit vs 64-Bit performance of sqlite on update SQL. Ordinary update sql staements have been used to update the timestamp attributes on a database which holds sensordata of meteorological instruments.

Re: [sqlite] C API docs

2011-10-24 Thread Alek Paunov
I do not know the answer, but I am thinking for an attempt to extract them as clang+lpeg exercise. Why you are asking ... ? On 24.10.2011 16:05, Baruch Burstein wrote: How are the C API documents auto-generated? Which tool is used? I see that they are all in the comments in the code, but

Re: [sqlite] SELECT on aggrgate

2011-10-24 Thread Pete
Pete Molly's Revenge Thanks Kee, that explains it. > > Message: 6 > Date: Sun, 23 Oct 2011 21:02:07 +0200 > From: Kees Nuyt > To: sqlite-users@sqlite.org > Subject: Re: [sqlite] sqlite-users Digest, Vol 46, Issue 23 > Message-ID:

Re: [sqlite] Problem with binding parameters to LIKE

2011-10-24 Thread Navaneeth.K.N
On Sun, Oct 23, 2011 at 2:21 PM, Baruch Burstein wrote: > I have done something similar and it worked for me, but there is an issue > with indexes you should take into account, as discussed here: >

Re: [sqlite] C API docs

2011-10-24 Thread Eugene N
hi Perhaps it widely popular doxygen, although its just a guess Eugene 2011/10/24 Baruch Burstein > How are the C API documents auto-generated? Which tool is used? > I see that they are all in the comments in the code, but couldn't find a > tool in the source that is used

Re: [sqlite] Using modifiers in julianday function

2011-10-24 Thread Dilip Ranganathan
On Mon, Oct 24, 2011 at 11:47 AM, Doug Currie wrote: > > On Oct 24, 2011, at 11:07 AM, Dilip Ranganathan wrote: > > > But as you all know, this doesn't work: > > > > select datetime(time) from table where time >= > > julianday(datetime(max(time)),'-2 hour','localtime')

Re: [sqlite] Using modifiers in julianday function

2011-10-24 Thread Doug Currie
On Oct 24, 2011, at 11:07 AM, Dilip Ranganathan wrote: > But as you all know, this doesn't work: > > select datetime(time) from table where time >= > julianday(datetime(max(time)),'-2 hour','localtime') order by time desc Try replacing datetime(max(time)) with (select datetime(max(time)) from

Re: [sqlite] EXT :Re: Concurrent readonly access to a large database.

2011-10-24 Thread Simon Slavin
On 24 Oct 2011, at 4:13pm, Bo Peng wrote: >> Can I ask which file-system you were using on the SSD drive when you >> obtained this result? > > It is ext4 on a 512G SSD on a Ubuntu system. Wow. I don't know what hard disk hardware or driver you were using originally, but it sucks. Even for

[sqlite] malformed database schema - no such table

2011-10-24 Thread aramati
Hello @all! I have a problem which I cannot solve: When trying to run a statement on my running db via JDBC I get the following error: java.sql.SQLException: malformed database schema (B_TEST_IDX) - no such table: main.BREATHS at org.sqlite.DB.throwex(DB.java:288) at

Re: [sqlite] EXT :Re: Concurrent readonly access to a large database.

2011-10-24 Thread Bo Peng
> Can I ask which file-system you were using on the SSD drive when you > obtained this result? It is ext4 on a 512G SSD on a Ubuntu system. Bo ___ sqlite-users mailing list sqlite-users@sqlite.org

[sqlite] Using modifiers in julianday function

2011-10-24 Thread Dilip Ranganathan
Lets say I have a column named 'time' that stores timestamps as juliandays. Suppose I only want to extract rows for the past 2 hours from now, I could do: select datetime(time) from table where time >= julianday('now','-2 hour','localtime') order by time desc That works as expected. However what

Re: [sqlite] EXT :Re: Concurrent readonly access to a large database.

2011-10-24 Thread Dan Kennedy
On 10/24/2011 09:20 PM, Bo Peng wrote: Other than using a SSD to speed up random access, I hope a VACUUM operation would copy tables one by one so content of the tables would not scatter around the whole database. If this is the case, disk caching should work much better after VACUUM... fingers

Re: [sqlite] EXT :Re: Concurrent readonly access to a large database.

2011-10-24 Thread Bo Peng
>> Other than using a SSD to speed up random access, I hope a VACUUM >> operation would copy tables one by one so content of the tables would >> not scatter around the whole database. If this is the case, disk >> caching should work much better after VACUUM... fingers crossed. > > VACUUM will

Re: [sqlite] How is the amalgamation produced?

2011-10-24 Thread Dan Kennedy
On 10/24/2011 08:32 PM, Baruch Burstein wrote: I found what seem to be two options for producing an amalgamation: 1. "./configure" and "make sqlite3.c" (something like that, it is not in front of me at the moment, but I have done this and know it works) 2. There is a Tcl script in the tool

[sqlite] How is the amalgamation produced?

2011-10-24 Thread Baruch Burstein
I found what seem to be two options for producing an amalgamation: 1. "./configure" and "make sqlite3.c" (something like that, it is not in front of me at the moment, but I have done this and know it works) 2. There is a Tcl script in the tool directory mksqlite3c.tcl that seems to do this too (I

[sqlite] C API docs

2011-10-24 Thread Baruch Burstein
How are the C API documents auto-generated? Which tool is used? I see that they are all in the comments in the code, but couldn't find a tool in the source that is used to extract them and make the links. -- Programming today is a race between software engineers striving to build bigger and