Advertise Books Events Forum News Social Networking Support Us

sdkIQ for iPhone
($4.99)

Shape Up
($0.99)

Your First iPhone App
($1.99)

Graves Robber
($1.99)

African Adventure
($0.99)

iTazer
($0.99)

ArtStudio
($3.99)

Pigs Vs Wolves
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-12-2009, 11:57 AM   #1 (permalink)
georgiecasey
New Member
 
Join Date: May 2009
Posts: 1
Default speed up like wildcard % search in sqlite

Hey,

I've a phonebook app with 180k records of names, addresses and numbers. I search my sqlite database every time the user changes text in the searchbar with this query [select id from phonebook where name like 'car%' and state='ny' limit 10]

for states with loads of entries, the search can be very slow as sqlite has to go through more records to find a match. also, if you search for 'a%' the search is quick but 'z%' it's slow as sqlite has to travel to the end of the records to find 10 matches.

i was wondering does anyone have tips to speed up the search.
georgiecasey is offline   Reply With Quote
 
Enter the iPhone App Challenge!  Win $500!
» Advertisements
» Stats
Members: 23,789
Threads: 38,566
Posts: 169,347
Top Poster: smasher (2,544)
Welcome to our newest member, flan344
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 10:40 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.