16 reputation
1
bio website opensource.gonnerman.org
location La Belle, MO
age 48
visits member for 1 year, 10 months
seen Oct 14 '12 at 13:51

Sep
22
comment Slow MySQL query, not sure why
Doing only suggestion 2 dropped the processing time from over a second on my development machine to about 0.58 seconds.
Sep
22
comment Slow MySQL query, not sure why
Looking at my original post, I see I led you to confusion. The time listed on the single-record lookup is not correct, and I'm not sure how it got in there. On the production server, it took around 0.9 seconds to process the query, while on my development machine it takes more than a second. Another similar query takes over 2 seconds to process. I'm guessing I ran it twice (so that caching made it look quite a bit better) and pasted the wrong copy here.
Sep
22
comment Slow MySQL query, not sure why
Is it necessary to drop the propertysid index? I understand the point of the combined index (clever, that) but not why you drop the other one.
Sep
21
comment Slow MySQL query, not sure why
If that's possible, yes. Or alternately, I need a way to do the same thing efficiently. The view is used as a sub-select in another query, along with another similar view which performs slightly better (but still not well). I'd be happy with 0.1 seconds, just not 2 or more. I used views for this to avoid having a single query with a GROUP BY clause that repeats the thirty or forty field names of the combined query all over again.