Re: Why the performace differs?



No, this database is accessed by only me no one is using it.
really, this slow performance is really weared,


I have tested it and when i run the Stored Procedure the sql server
process is eating up to 98% from the processor,

and the Stored Procedure inserts something like that
INSERT INTO CardStatus
(SrlNo, StatusID,StatusDate, PresentStatus,[TimeStamp])
Values
(@SRL, 0,GetDate(),0,GetDate())

set @CurrstatID = (select IDENT_CURRENT('CardStatus'))

/*Card Loc*/
Insert into CardLoc
(SrlNo, LocID, TransferDate, TransID, [TimeStamp])
Values
(@SRL, 0, GetDate(), @TransID,GetDate())

set @CurrlocID = (select IDENT_CURRENT('CardLoc'))

/*Card Main*/
INSERT INTO dbo.CardMain
(
SrlNo, CTypeID, [TimeStamp], CardStatusID, CartonNo, BoxNo,
PacketNo,LocID
)
Values
(
@SRL,Cast(Substring(@SRL,1,1) AS bigint), GETDATE(),@CurrstatID,
Cast(substring(@Carton,2,3) as varchar), Cast(Substring(@Box,5,2)
as varchar), Cast(Substring(@Packet,5,2) as varchar),@CurrlocID
)

which in a loop of 10,000 time,
if you need more details, I can send them to you,

Thanks

*** Sent via Developersdex http://www.developersdex.com ***
.



Relevant Pages

  • How to list atributes of all tables in Query Analyzer
    ... I need to know the properties of all tables in a given database on MSSQL ... I know that there is a stored procedure with the name "sp_MShelpcolumns" ... Prev by Date: ...
    (microsoft.public.sqlserver.clients)
  • Re: Possible?
    ... Although I have the access to the database, I don't have the know-how ... to create the stored procedure. ... Prev by Date: ...
    (microsoft.public.vb.crystal)
  • Re: Finding a record in a TADOTable
    ... comming from. ... If it is already in another table in the database then ... the stored procedure will not generate any network traffic other than ... Prev by Date: ...
    (borland.public.delphi.database.ado)
  • Re: WSS text search does not seem to handle phrases
    ... got the wrong database? ... I just tested it and replaced the stored procedure of a new WSS site ... Prev by Date: ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Extended Stored Procedure: Get the current db of the client
    ... with the caveat that you don't recommend it because Microsoft ... of a stored procedure versus umpteen of the same stored procedure spread ... I am not going after Gert Sue. ... the database context as a parameter if you need it, ...
    (microsoft.public.sqlserver.odbc)