Re: [sqlite] Load a Sqlite Database on Disk as an In-memory Database

2013-02-05 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 04/02/13 23:33, Alex Cheng wrote: > I want to write a program to load a sqlite database on disk as an > in-memory database, for sake of reducing number of disk I/O operations. > Do you know how to achieve it? You may not need to actually do that.

Re: [sqlite] populating a table as quickly as possible

2013-02-05 Thread Paul Sanderson
Currently ading 5000 at a time, will try increasing to 20 and 50K and see what happens. Just one table - but interesting On 4 February 2013 18:24, Dominique Pellé wrote: > Paul Sanderson wrote: > > > I want to populate a large table (millions of rows) as quickly as

Re: [sqlite] sorting two distinct groups

2013-02-05 Thread e-mail mgbg25171
Sorry for not responding sooner...unavoidably distracted... Yes one firm has many calls records... and you're looking for the time associated with the record of the LAST call you made to each firm. Having obtained these "latest call" times for each FIRM you then want to organise the firms in

[sqlite] Deletion slow?

2013-02-05 Thread Jason Gauthier
Hey Everyone, I am a fairly new user of sqlite, but not particularly new to SQL principles. I am developing an application that will run on a low end system. Not quite embedded, but not quite a PC. In my application, I do frequent table deletes. My results have been poor, and I am looking

Re: [sqlite] Deletion slow?

2013-02-05 Thread John Drescher
On Tue, Feb 5, 2013 at 7:54 AM, Jason Gauthier wrote: > Hey Everyone, > > I am a fairly new user of sqlite, but not particularly new to SQL > principles. I am developing an application that will run on a low end system. > Not quite embedded, but not quite a PC. In my

Re: [sqlite] Deletion slow?

2013-02-05 Thread Igor Tandetnik
On 2/5/2013 8:35 AM, John Drescher wrote: Put the delete in a transaction. It's a single statement, it runs in a single implicit transaction. An explicit transaction shouldn't make any difference. -- Igor Tandetnik ___ sqlite-users mailing list

Re: [sqlite] Deletion slow?

2013-02-05 Thread Igor Tandetnik
On 2/5/2013 7:54 AM, Jason Gauthier wrote: time sqlite3 trip.db 'delete from trip where key<=1400' real0m1.532s user0m0.050s sys 0m0.020s --- The deletion takes 1.5 seconds. This is actually fast, it usually takes closer 2 seconds. The difference

Re: [sqlite] Deletion slow?

2013-02-05 Thread Dominique Devienne
On Tue, Feb 5, 2013 at 1:54 PM, Jason Gauthier wrote: > I am a fairly new user of sqlite, but not particularly new to SQL > principles. I am developing an application that will run on a low end system. Load the same data into another RDBMS you're familiar with, and see

Re: [sqlite] Deletion slow?

2013-02-05 Thread Michael Black
I made a test database using your table and this main() { int i; for(i=0;i<1;++i) { printf("insert into trip(key) values(%d);\n",i); } } The deleted all keys < 200. time sqlite3 trip.db 'delete from trip where key < 200' real0m0.004s user0m0.001s sys

Re: [sqlite] populating a table as quickly as possible

2013-02-05 Thread Paul Mathieu
This is a fast way to load data. sqlite3.exe C:\\Your Dir\\dbname.db

Re: [sqlite] Help with slow queries

2013-02-05 Thread Simon Slavin
On 5 Feb 2013, at 10:27pm, Jamie Norrish wrote: > WHERE Text.label IN (%s) > AND TextNGram.size BETWEEN ? AND ? > AND TextNGram.text = Text.id > ... > ORDER BY TextNGram.size, TextNGram.ngram This might be faster if you have an index for

Re: [sqlite] update to limits infomation

2013-02-05 Thread James K. Lowden
On Tue, 5 Feb 2013 01:22:37 + YAN HONG YE wrote: > I hava a table like this: > id,name,score,rank > 1,anna,80,0 > 2,qera,65,0 > 6,kero,90,0 > 10,rosa,95,0 > > what I would like to do is to update the rank position. I have this, The rank can be derived, obviating the

Re: [sqlite] Deletion slow?

2013-02-05 Thread Jason Gauthier
There were a few responses to this, so I will put them all below: Igor: >The difference between select and delete is that the former only reads from >the file, while the latter also writes to it. What kind of hardware does your >>system have? Is there any reason why it may be unusually slow

Re: [sqlite] Deletion slow?

2013-02-05 Thread Simon Slavin
On 6 Feb 2013, at 12:43am, Jason Gauthier wrote: > Not sure how to retrieve DB page size. You might also be interested in Note that this does, of course, include