chrissparkle
Programmer
I have two pages on my website which for some reason just completely lock up. One is worse than the other, it's my sign up page. The proc is below:
It is really strange because I can't see anything wrong with the proc. Does SQL not like too many inserts? The tables I'm inserting into are getting read a lot using SQL (with nolock) queries - am I doing something wrong there? Is there another way to write this code so that it doesn't cause problems? It only seems to be happening when the website is really busy.
Code:
declare @regionnamt varchar(40)
set @regionnamt = (Select FullRegName from Regions Where RegionID = @Region)
Insert Into Members
(Country, Region, Age, Looking, HAge1, HAge2, LAge1, LAge2, Nickname, DatingSex, FriendshipSex, Gender, DateJoined, Updated, Title, Verify, Online, RegionN)
Values
(@Country, @Region, @Age, @Looking, @HAge1, @HAge2, @LAge1, @LAge2, @Nickname, @DatingSex, @FriendshipSex, @Gender, getdate(), getdate(), @Title, 1, getdate(), @regionnamt)
SELECT @@IDENTITY AS RecentMemberID
DECLARE @find int
SET @find = @@IDENTITY
Insert Into CheckIt
(MemberID, Unread, Smiles)
Values
(@find, @UnRead, @Smiles)
Insert Into MainProfile
(MemberID, Birthday)
Values
(@find, @Birthday)
Insert Into Opinions
(MemberID)
Values
(@find)
Insert Into MembersControl
(MemberID, FirstName, Surname, EmailAddress, ThePassword, Country, wfrom)
Values
(@find, @Firstname, @Surname, @EmailAddress, @ThePassword, @COuntry, @wfrom)
GO
It is really strange because I can't see anything wrong with the proc. Does SQL not like too many inserts? The tables I'm inserting into are getting read a lot using SQL (with nolock) queries - am I doing something wrong there? Is there another way to write this code so that it doesn't cause problems? It only seems to be happening when the website is really busy.