Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2001-09-28 : 09:14:23
|
| Rodney writes "Q. I have a sp that was I fixed and it has reported that a 25% increase in performance. The Availability lookup has gone from 40 seconds to 30 seconds.Still too high?Any ideas to bring in down in seconds?sp_checkavail/***************************************************************************** * This SP takes the search criteria values from Check Availability screen and * returns back the unit details, corresponding Folio details and Rate Unit Type * details as result sets. * It also calls 'sp_getcostdetails' to calculate 'Cost'(Rent) of each unit. * **************************************************************************** * Name Mandatory Comments * **************************************************************************** * Company : Tanning Technology International * Author : Manohar Varanasi * Created on : * ****************************************************************************** * RETURN Values/Result sets DESCRIPTION : ****************************************************************************** * Values/Result Sets MEANING ****************************************************************************** * Unit details* Rate Unit Type details* Folio Details****************************************************************************** HISTORY :* Author Date of Modificaton Comments ****************************************************************************** MV 05/10/01 condition added as CANCELLED folios should not display MV 06/12/01 Completely re-wrote this SP to replace TEMP tables with Cursors. Added a condition to get only 'primary' guest details in Folio details retrieval. This closes defect#1105 MV 06/14/01 Increased the size of res_type PS 06/20/01 Commented sp_getcostdetails sp execution and added logic for location and comlex MV 06/20/01 1. Selecting Booking rules only when search_type is not equal to 'L' 2. selecting min_rent as a sub query when search is on a particular unit PS 06/28/2001 Added isnull to due_date and HOTEL and Studio bug MV 07/04/01 Implemented Rotation Order Basis Business setup. MV 07/10/01 Modified stayrule_view to consider season MV 07/16/01 Implemented other booking rules max_agent_nights, max_comp_nights etc.. MV 07/19/01 Rate Unit Type definitions are sorted according to the Rate Sort Order. MV 07/20/01 Null validated the total agent nights & total complimentary nights. Folio detail select is modified MV 07/30/01 The current booking nights has been added while comparing against the Complimentary nights. MV 08/03/01 Available search select is modified so that the arrival day is not checked for availability RW 09/11/01 Modifications made to where statements and indexes tuned.******************************************************************************/ CREATE PROCEDURE frsuser.sp_checkavail @unit_name varchar(30),@search_type varchar(1),@arrdate datetime, @depdate datetime,@adults int, @child int,@free_child int,@complex int,@country varchar(30),@state varchar(2),@city varchar(30), @zip varchar(10),@disc smallmoney, |
|
|
|
|
|
|
|