Re: [sqlite] Slow SELECTs in application

2009-10-27 Thread John Crenshaw
Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Simon Slavin Sent: Tuesday, October 27, 2009 6:56 AM To: General Discussion of SQLite Database Subject: Re: [sqlite] Slow SELECTs in application On 27 Oct 2009, at 8:30am, Unabashed wrote: >

Re: [sqlite] Slow SELECTs in application

2009-10-27 Thread Simon Slavin
On 27 Oct 2009, at 8:30am, Unabashed wrote: > I have two general types of selects for this table. First one is > "SELECT > word,wform,id_norm FROM mgWords WHERE id=" > and second is > "SELECT > id FROM mgWords WHERE (word='') AND (wform='') > AND > (id_norm=)". > So I tried to add indexes

Re: [sqlite] Slow SELECTs in application

2009-10-27 Thread Unabashed
Thanks very much to all for answers! Sorry, I had some troubles with my internet connection, so I've read them just now. I need exactly unique value by set of this three columns in my table, that is correct. Application do not write temporary data to the disc, because it works in one transaction,

Re: [sqlite] Slow SELECTs in application

2009-10-21 Thread Kees Nuyt
On Wed, 21 Oct 2009 17:35:41 +0100 (BST), Keith Roberts <ke...@karsites.net> wrote: >On Wed, 21 Oct 2009, Unabashed wrote: > >> To: sqlite-users@sqlite.org >> From: Unabashed <wombat...@gmail.com> >> Subject: [sqlite] Slow SELECTs in application >> &g

Re: [sqlite] Slow SELECTs in application

2009-10-21 Thread Simon Slavin
On 21 Oct 2009, at 2:47pm, Unabashed wrote: > I'm using SQLite as DB in my application. My problem consists of two > aspects. First , it works great, but on large data SELECTs are very > slow > (10-20s!). Queries are in one transaction. My table structure is: > CREATE TABLE mgWords ( > id

Re: [sqlite] Slow SELECTs in application

2009-10-21 Thread John Crenshaw
- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Keith Roberts Sent: Wednesday, October 21, 2009 12:36 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] Slow SELECTs in application On Wed, 21 Oct 2009, Unabashed wrote: > To: sqlite-us

Re: [sqlite] Slow SELECTs in application

2009-10-21 Thread Keith Roberts
On Wed, 21 Oct 2009, Unabashed wrote: > To: sqlite-users@sqlite.org > From: Unabashed <wombat...@gmail.com> > Subject: [sqlite] Slow SELECTs in application > > > Hello! > I'm using SQLite as DB in my application. My problem consists of two > aspects. First , it

Re: [sqlite] Slow SELECTs in application

2009-10-21 Thread John Crenshaw
at doesn't help, we probably need to know the error. -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Unabashed Sent: Wednesday, October 21, 2009 9:47 AM To: sqlite-users@sqlite.org Subject: [sqlite] Slow SELECTs in application

Re: [sqlite] Slow SELECTs in application

2009-10-21 Thread O'Neill, Owen
On Behalf Of Unabashed Sent: Wednesday, October 21, 2009 2:47 PM To: sqlite-users@sqlite.org Subject: [sqlite] Slow SELECTs in application Hello! I'm using SQLite as DB in my application. My problem consists of two aspects. First , it works great, but on large data SELECTs are very slow (10-20s!

Re: [sqlite] Slow SELECTs in application

2009-10-21 Thread Pavel Ivanov
> It seems, that the problem is in sql. How to optimize table to have fast > selects? Different sql queries require different things to be the fastest possible. There's no one magic pill for all. > INSERT INTO mgWords (id_norm,word,wform) VALUES (0,'aword','awform') > it clauses error. Which