Jump to content

need help shortening this sql statement...


Gnub

Recommended Posts

I've initiated this query, and it does what it's ment to do, however, it takes over 3 minutes to complete.  is there a way to shorten the size of this query? and hopefully shortening the processing time.

 

Need more info, just ask.

 

DELETE
FROM dbo.HOTELBEDS_DATABASE
WHERE dbo.HOTELBEDS_DATABASE.AIRPORT IN (SELECT  HA.IATA_CODE FROM 
dbo._HOTELBEDS_HOTELS AS HH JOIN  dbo._HOTELBEDS_AIRPORTS AS HA ON HH._DESTINATION_CODE
= HA.HB_CODE, dbo._HOTELBEDS_BOARDTYPE AS HB WHERE HH._BOARD_TYPE_DESCRIPTION =
HB.BOARD_TYPE GROUP BY HA.IATA_CODE
									)
AND dbo.HOTELBEDS_DATABASE.BOARD_BASIS IN  (SELECT  dbo._HOTELBEDS_BOARDTYPE.BT_SHORT
FROM dbo._HOTELBEDS_HOTELS, dbo._HOTELBEDS_BOARDTYPE WHERE
dbo._HOTELBEDS_HOTELS._BOARD_TYPE_DESCRIPTION = dbo._HOTELBEDS_BOARDTYPE.BOARD_TYPE
GROUP BY dbo._HOTELBEDS_BOARDTYPE.BT_SHORT
) 

 

Thanks in advance

 

-Gnub

Link to comment
https://forums.phpfreaks.com/topic/44949-need-help-shortening-this-sql-statement/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.