On 8/9/11 10:23 PM, Wade Preston Shearer wrote:
> On 9 Aug 2011, at 22:14, Steve Meyers wrote:
>
>>> On 8/9/11 9:27 PM, Wade Preston Shearer wrote:
>>>>> Sorry… the =39 shouldn't have been in there. It should
>>>>> return multiple rows. I pasted the wrong query. I was testing
>>>>> with that. Here is the query:
>>>>>
>>>>> http://pastie.org/2348436
>>>
>>> What times do you get for each of the inner queries, and how many
>>> results?  To optimize this query, you first need to identify
>>> which part is slow, and this query has multiple parts.
> The first: 22041 rows in set (0.06 sec)
>
> The second: 1324011 rows in set (2.53 sec)

After looking at it more closely, it's just a really ugly query. 
Sometimes queries just can't be optimized that much.  What I would 
probably do is just cache it once an hour, or as often as is feasible. 
Alternatively, you could use something like FlexViews to create a 
materialized view, which could be updated much more frequently with 
little penalty.

Steve

_______________________________________________

UPHPU mailing list
[email protected]
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to