Re: [sqlite] help needed to optimize a query

2011-06-28 Thread Lazarus 101
On Tue, Jun 28, 2011 at 8:18 PM, Jan Hudec wrote: > > name TEXT > > > > DATA > > file_id INTEGER REFERENCES files(resource_id) ON DELETE CASCADE, > > data_type TEXT, > > If nothing else, you want to define integer identifiers for the data types > and use integer here. That will save you some spac

Re: [sqlite] help needed to optimize a query

2011-06-28 Thread Lazarus 101
e it creates an index automatically and that's why there is no big improvement On Wed, Jun 29, 2011 at 2:30 AM, Simon Slavin wrote: > > On 28 Jun 2011, at 9:58pm, Lazarus 101 wrote: > > >> You should make an index on the columns 'file_id' and 'data_type

Re: [sqlite] help needed to optimize a query

2011-06-28 Thread Lazarus 101
On Tue, Jun 28, 2011 at 8:18 PM, Jan Hudec wrote: > On Tue, Jun 28, 2011 at 17:33:23 +0300, Lazarus 101 wrote: > > Hi guys, i'm working on an Android app and using sqlite to store some > data > > and i need some help with a query. > > > > I have the follo

Re: [sqlite] help needed to optimize a query

2011-06-28 Thread Lazarus 101
On Tue, Jun 28, 2011 at 5:48 PM, Simon Slavin wrote: > > On 28 Jun 2011, at 3:33pm, Lazarus 101 wrote: > > > FILES > > file_id INTEGER NOT NULL, > > name TEXT > > I assume that SQLite has identified 'file_id' as its own 'rowid' column and &

[sqlite] help needed to optimize a query

2011-06-28 Thread Lazarus 101
Hi guys, i'm working on an Android app and using sqlite to store some data and i need some help with a query. I have the following table structure: FILES file_id INTEGER NOT NULL, name TEXT DATA file_id INTEGER REFERENCES files(resource_id) ON DELETE CASCADE, data_type TEXT, value TEXT data_typ