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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Peformance of query - multiple value WHERE Clause

Author  Topic 

zippy
Yak Posting Veteran

69 Posts

Posted - 2001-09-24 : 19:52:51
Hi,

I am calling the following code from within a stored procedure

SELECT @OldTotal = Total
FROM tblResults
WHERE SuburbID = @SuburbID AND PersonID = @PersonID AND RefererOrganisationID = @RefererOrganisationID AND OccupationID = @OccupationID AND BranchID = @BranchID AND WeekEnding = @WeekEnding

I was just wondering if this is going to be very slow?
The table looks like this

[SuburbID] [int] NOT NULL ,
[PersonID] [int] NOT NULL ,
[RefererOrganisationID] [int] NOT NULL ,
[OccupationID] [int] NOT NULL ,
[BranchID] [int] NOT NULL ,
[WeekEnding] [datetime] NOT NULL ,
[Total] [int] NOT NULL ,

All the values except the Total are primary/secondary keys.

Feedback would be appreciated


Check out the worlds fastest computers at http://www.ocgurus.com
   

- Advertisement -