SQL 语句优化
SELECT h.HotelId,h.hotelName ,h.hotelEnglishName,h.country,h.city,h.tow,h.Location,h.salableState,h.StarLevel,h.ProductLabel,h.HotelType,
ext.Address,ext.Rating,ext.Parking,ext.SwimmingPool,ext.Restaurant,ext.OtherFacility,ext.PickupService,ext.ForeignExchange,ext.NetworkService,
ext.OtherService,ext.AcceptCreditCard,ext.OtherPolicy,image.path as imgPath,MIN(p.Price) as Price FROM sz_hotel as h LEFT JOIN sz_exthotel as ext ON (ext.HotelId=h.HotelId)
LEFT JOIN sz_roomtype as r ON (r.HotelId=h.HotelId) LEFT JOIN sz_hotelpicture as image ON (image.HotelId=h.HotelId)
LEFT JOIN sz_DateRoomPriceInfo as p ON ( p.RoomId=r.RoomTypeId AND p.Price <>0 AND p.Price IS NOT NULL) group by h.HotelId
ext.Address,ext.Rating,ext.Parking,ext.SwimmingPool,ext.Restaurant,ext.OtherFacility,ext.PickupService,ext.ForeignExchange,ext.NetworkService,
ext.OtherService,ext.AcceptCreditCard,ext.OtherPolicy,image.path as imgPath,MIN(p.Price) as Price FROM sz_hotel as h LEFT JOIN sz_exthotel as ext ON (ext.HotelId=h.HotelId)
LEFT JOIN sz_roomtype as r ON (r.HotelId=h.HotelId) LEFT JOIN sz_hotelpicture as image ON (image.HotelId=h.HotelId)
LEFT JOIN sz_DateRoomPriceInfo as p ON ( p.RoomId=r.RoomTypeId AND p.Price <>0 AND p.Price IS NOT NULL) group by h.HotelId
...全文
相关推荐
数据库性能优化之SQL语句优化
数据库性能优化之SQL语句优化数据库性能优化之SQL语句优化数据库性能优化之SQL语句优化数据库性能优化之SQL语句优化
SQL SERVER 的SQL语句优化方式小结
千辛万苦,终于把数据库服务器的CPU从超过50%(开5个程序线程)乃至100%(开10个程序线程)降低到了5%。摸索到了一些门道,总结一下
必须掌握的30种SQL语句优化
便于Java入门人员交流学习。可以深刻理解该语言的常用API。帮助初学者尽快入门。
SQL语句的优化学习总结
精通SQL语句的优化学习总结精通SQL语句的优化学习总结
sql语句优化之用EXISTS替代IN、用NOT EXISTS替代NOT IN的语句
sql语句优化之用EXISTS替代IN、用NOT EXISTS替代NOT IN的语句


