Re: [sqlite] CURRENT_TIMESTAMP records / displays incorrect value?

2005-12-21 Thread Murray @ PlanetThoughtful
[EMAIL PROTECTED] wrote: "Murray @ PlanetThoughtful" <[EMAIL PROTECTED]> writes: I have a column defined with DEFAULT CURRENT_TIMESTAMP in an SQLite 3.2.7 db (on WinXP SP2, if that's important). I've noticed that the value being stored in that column is being recorded / displayed

Re: [sqlite] CURRENT_TIMESTAMP records / displays incorrect value?

2005-12-21 Thread Derrell . Lipman
"Murray @ PlanetThoughtful" <[EMAIL PROTECTED]> writes: > I have a column defined with DEFAULT CURRENT_TIMESTAMP in an SQLite 3.2.7 db > (on WinXP SP2, if that's important). I've noticed that the value being > stored in that column is being recorded / displayed incorrectly. For > example, it's

Re: [sqlite] CURRENT_TIMESTAMP records / displays incorrect value?

2005-12-21 Thread rbundy
Refer http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions. 'localtime' has to be allowed for. Regards. rayB |-+> | | "Murray @| | | PlanetThoughtful"| | |

[sqlite] CURRENT_TIMESTAMP records / displays incorrect value?

2005-12-21 Thread Murray @ PlanetThoughtful
Hello All, New to the list, so please forgive if this has been discussed previously. I have a column defined with DEFAULT CURRENT_TIMESTAMP in an SQLite 3.2.7 db (on WinXP SP2, if that's important). I've noticed that the value being stored in that column is being recorded / displayed

[sqlite] database disk image is malformed

2005-12-21 Thread Jan Kandziora
Hello all, I'm using sqlite3.2.7 and the tcl interface for my cash desk application TkKasse. Now a user of TkKasse got this serious problem with his cash register database. The cash register data is stored in a sqlite3 database with standard settings, which is now about 2MB in size. They

[sqlite] Question about threads

2005-12-21 Thread Eduardo
Hello: We are going to implement p-threads in our embebbed OS and want to know how SQLite uses them. Each database will have its own thread or each part of SQLite (tokenizer, parser, btree...) have its own thread or a mixture of both? TIA

Re: [sqlite] Slowness with in-memory database

2005-12-21 Thread Jay Sprenkle
> Donald Griggs and Jay Sprenkle have suggested transactions, which I had not > been using, and I've wrapped the all 800,000 iterations into one tran and > that has reduced the time down to 6 minutes - thanks Donald and Jay!! > Problem fixed - it's now taking as much time to ship the data into

RE: [sqlite] Slowness with in-memory database

2005-12-21 Thread CARTER-HITCHIN, David, FM
Hi Richard et al., 1. It's not thrashing - I've watched the process grow with prstat -cp `pgrep gti` and it doesn't top 100MB - as I said I've got 1GB of RAM in my workstation, with 2.5GB of free swapspace. 2/3. There are no triggers or indexes on the table - they are very simple and vanilla

Re: [sqlite] Slowness with in-memory database

2005-12-21 Thread drh
"Griggs, Donald" <[EMAIL PROTECTED]> wrote: > Regarding: ... Something is misconfigured as it takes ~20 times as long to > insert into an in-memory db, as it does to select from Sybase and store to a > file. ... > > > I'm not sure you're using transactions. If not, BEGIN a transaction before >

Re: [sqlite] Slowness with in-memory database

2005-12-21 Thread Jay Sprenkle
Are the inserts inside a transaction? If you're doing a lot of identical inserts you can prepare your statement so it's parsed once and then just execute it repeatedly.

Re: [sqlite] Slowness with in-memory database

2005-12-21 Thread drh
"CARTER-HITCHIN, David, FM" <[EMAIL PROTECTED]> wrote: > Hi, > > Really hope someone out there can help me with this. > > I've written a C++ cache class which extracts ad-hoc data from a Sybase > database and inserts it into an in-memory SQLite database. This is working > fine but is very slow

RE: [sqlite] Slowness with in-memory database

2005-12-21 Thread Griggs, Donald
Regarding: ... Something is misconfigured as it takes ~20 times as long to insert into an in-memory db, as it does to select from Sybase and store to a file. ... I'm not sure you're using transactions. If not, BEGIN a transaction before starting the loop of INSERTs and END it when done. This

Re: [sqlite] � [sqlite] About Index using

2005-12-21 Thread drh
Bo Lin <[EMAIL PROTECTED]> wrote: > > The Sql looks like > select x, y, sum(z)/1000 as bw from aa where > a=1 and b=1 and > c =1 and d= 6 group by x, y having count(*) > 1 order by bw desc > limit 10 > > 1) create index 1 on aa (d) > 2) create

[sqlite] Re: 回复: [sqlite] Re: 回复: [sqlite] Re: About Index us ing

2005-12-21 Thread Igor Tandetnik
Bo Lin wrote: x,y are both column of Table "aa", they may have random value . And you think that will affect the performance.? What I think is Sqlite will first use "where cluase" to get limited value ,then use "group by" in the same . Maybe, maybe not. Use EXPLAIN to find out. Igor

[sqlite] Slowness with in-memory database

2005-12-21 Thread CARTER-HITCHIN, David, FM
Hi, Really hope someone out there can help me with this. I've written a C++ cache class which extracts ad-hoc data from a Sybase database and inserts it into an in-memory SQLite database. This is working fine but is very slow during the insert data phase. To give some quantitative idea of what