Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread Jay A. Kreibich
On Wed, Feb 03, 2010 at 10:18:01AM -0800, a1rex scratched on the wall: > ?? I/O data transfer rate - up to 100 Mbps > ?? Sustained data transfer rate - Up to 58 Mbps > ?? Average seek time - 8.5ms > ?? Average latency - 4.16ms > > From this data nothing justifies the 120ms update of the

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread Pavel Ivanov
>  Capacity: 120.9 GB >  Speed: 7200 rpm >  Average Read Time:8.5 ms > ... > From this data nothing justifies the 120ms update of the record! Look at 7200 rpm and here http://www.sqlite.org/faq.html#q19. Pavel On Wed, Feb 3, 2010 at 1:18 PM, a1rex wrote: > > Thank you

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread Jean-Christophe Deschamps
>I will try to do something to that extent using timer and character >counter. >I hoped that I could update the text stored in the database character >by character as fast as they come from the keyboard driver. >Unfortunately updates noticeably slow down the display of typed >characters.

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread a1rex
Thank you kindly for all your suggestions! >If you want SQLite to support all ACID properties you cannot change >anything to speed up updates. Making sure that I do not loose a character was my primary objective. > If you are doing bulk updates, and are in a position to re-run the > data

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread David Bicking
As a test, have you tried wrapping your updates in a transaction? That would isolate if the slow down is the actual writing of the data to disk. Where is the file sitting: A local drive, or something across a network connection? David On Wed, 2010-02-03 at 08:51 -0800, a1rex wrote: > >-

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread Pavel Ivanov
If you want SQLite to support all ACID properties you cannot change anything to speed up updates. You can only change disks to something with higher rotation speeds or some non-rotational ones (although I'm not sure that they will be faster). Another thing to try is change your application

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread Igor Tandetnik
a1rex wrote: > Retraction. Mea Culpa. Back to square one… > The modified code did not write anything to the drive! But there was > no error message from the SQLITE. Why should there be? You have a legal statement - essentially update notes set note=1 where id='note text';

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread Jay A. Kreibich
On Wed, Feb 03, 2010 at 08:51:46AM -0800, a1rex scratched on the wall: > >- Original Message > >From: Pavel Ivanov > >To: General Discussion of SQLite Database > >Sent: Wed, February 3, 2010 11:37:17 AM > > >Just first thought came to my

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread a1rex
>- Original Message >From: Pavel Ivanov >To: General Discussion of SQLite Database >Sent: Wed, February 3, 2010 11:37:17 AM >Just first thought came to my mind: are you sure that 2 versions of >code mentioned do the same thing? In particular

Re: [sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread Pavel Ivanov
Just first thought came to my mind: are you sure that 2 versions of code mentioned do the same thing? In particular I'm asserting that second version (under #if 1) doesn't do any actual updating and doesn't change your database because you have wrong parameter indexes. And one more question: why

[sqlite] Shocked by long updates of the text database, 1000 speed improvement after small modification to the code.

2010-02-03 Thread a1rex
I just encountered very curious case in Sqlite. I have very simple data base with only one table and one index: "CREATE TABLE IF NOT EXISTS notes(id INTEGER PRIMARY KEY, note TEXT)"; My updates to the simple text database were very slow. Extremely slow! I changed my code and achieved 1000