Re: [sqlite] Query Optimization Help

2009-02-12 Thread Mike Eggleston
On Wed, 11 Feb 2009, inZania might have said: > > Hello, > > I have a query that is slowing down my application significantly; in some > cases, it takes 20+ seconds (this is in a SQLite database in an iPhone app, > which is why it is so slow - the iPhone doesn't have as much system >

Re: [sqlite] Query Optimization Help

2009-02-11 Thread Igor Tandetnik
inZania wrote: > The situation is this: there is a table, "cards", which I am > searching. Each card has a card_id, name, text, etc. There is also a > table "card_tags" which has only the rows "card_id" and "tag", > because a single card may have several tags. The query I'm

[sqlite] Query Optimization Help

2009-02-11 Thread inZania
Hello, I have a query that is slowing down my application significantly; in some cases, it takes 20+ seconds (this is in a SQLite database in an iPhone app, which is why it is so slow - the iPhone doesn't have as much system resources). If anybody could help me optimize this query, I'd

Re: [sqlite] Query optimization help

2004-02-02 Thread Rickard Andersson
The advice from Dr. Richard Hipp did the trick. I added a multi column index and now the query takes less than a tenth of a seconds. Thanks a lot for the help you guys! I was going to send this acknowledgement by replying to the message by Dr. Hipp, but for some reason I didn't receive it, so

Re: [sqlite] Query optimization help

2004-02-02 Thread D. Richard Hipp
Rickard Andersson wrote: I'm having some performance problems with queries looking like the following: SELECT DISTINCT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM topics

Re: [sqlite] Query optimization help

2004-02-01 Thread Greg Obleshchuk
try using group by instead of DISTINCT In other DB it is faster. http://www.sqlite.org/cvstrac/wiki?p=PerformanceTuning regards Greg - Original Message - From: Rickard Andersson To: [EMAIL PROTECTED] Sent: Monday, February 02, 2004 2:00 PM Subject: [sqlite] Query

[sqlite] Query optimization help

2004-02-01 Thread Rickard Andersson
I'm having some performance problems with queries looking like the following: SELECT DISTINCT p.poster_id AS has_posted, t.id, t.subject, t.poster, t.posted, t.last_post, t.last_post_id, t.last_poster, t.num_views, t.num_replies, t.closed, t.sticky, t.moved_to FROM topics AS t LEFT JOIN posts AS