Hi, all and Happy New Year! (early...)

I'm trying to run this query:

select     p.property_id, pl.propertyPhotoLink, o.office_name
                                                
from       properties p
                                                
left join  hmls_property_photo_links pl
on         substring_index(p.mls_number, '_', 1) = pl.mlsNumber
and        pl.photoLabel = 'Main View'
                                                
left join  offices o
on         p.listing_office_mls_id = o.mls_office_id
        

order by   #arguments.jsSort2#    <--- this is "o.display_order_cbhr"
limit      #itemsPerPage#         <--- this is currently 20
offset     #mysqlOffset#          <--- this is currently 0

But when I run it, MySQL hangs...

If I remove the "order by" clause, it works.

A fuller version of this query has been running fine, but when I added
the "limit" and "offset" to it, I started having problems with MySQL 5
spiking the CPU to 50% and never completing the query.

Based on my searching, the order of "order by", "limit, and "offset"
is correct.  I've tried moving them around anyway, with no change.

Thoughts on this?

Thanks!

Rick



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340324
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to