On 25 Kwi, 05:34, skink <[email protected]> wrote:
> hi,
>
> anyone working with big sqlite tables and
> trying to match rows using patterns (for example for autocomplete
> purposes) ?
>
> recently i played with LIKE statement and it seems it will never use
> table index (if any), you have to use GLOB instead. but.......
>
> the weird thing is that you cannot use selectionParams in your query:
> you have to specify your pattern in selection like:
>
> sel = "select * from words where key GLOB 'test*'"
>
> db.rawQuery(sel, null)
>
> my words table has two TEXT columns: 'key' and 'value' and index on
> 'key'
>
> for example: i have table with ~28000 rows and when using
> selectionParams my query took 1500 ms and without selectionParams 20
> ms
>
> does it have anything to do with android or its sqlite weird feature?
and, yes, i know its insecure but it's the only way to convince sqlite/
android to use table index....
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---