Viewing 15 posts - 151 through 165 (of 167 total)
You could also run the SQL Profiler with -
Events: RPC:Completed, SP:Completed, SQL:BatchCompleted
Data Columns: Duration, TextData
and this will give you elapsed execution time in milliseconds of each event as it...
April 28, 2005 at 9:32 am
Find a C/C++ programmer and have him/her create an Extended Stored Procedure that takes 1 parameter; the number of single-column (an Int) rows to return. The column will contain the...
April 27, 2005 at 6:56 pm
You could try something like:
Select * from dbo.[YourTable] where
(@p='' or Colp1 = @p1)
and
(@p2='' of Colp2 = @p2)
and
(...)
and
@p1 + @p2 +... <>''
then there's that little problem with indices...
April 27, 2005 at 5:32 pm
To catch those elusive error messages you could also try:
Declare @sql nVarChar(4000)
Set @sql=N'osql -Usa -P -Q"declare @t table(PKey Int not Null) insert @t select Null"'
Exec xp_CmdShell @sql
and do whatever you...
April 27, 2005 at 5:24 pm
Hmmmm, I too had problems with SP1. After what appeared to be a clean installation my system rebooted and began reporting DLL load/entrypoint errors for MMC snap-ins and other SQL...
April 14, 2005 at 8:24 am
I'm just not feeling the luv...
April 13, 2005 at 4:16 pm
-- Create a trigger on YourTable with the following code:
Create Trigger [YourTableInsertTrigger] on [YourTable] Instead of Insert
As
Truncate Table dbo.[YourTable]
Insert dbo.[YourTable] Select * from Inserted
-- Execute this in your script or procedure:
Insert...
April 13, 2005 at 10:01 am
This error message only indicates the "potential" to exceed the maximum record size. Var-Char/Binary columns are not always filled to maximum capacity therefore the total record length may not exceed...
April 5, 2005 at 7:49 am
You could be experiencing a difference in SET options from the connection type used by Query Analyzer and that of ASP.NET (ODBC?). In some cases it may be necessary to...
April 1, 2005 at 8:04 am
You could use an index hint:
SELECT DOCKEYID FROM DOCKEY (INDEX(YourIdexName)) WHERE DOCNBR like @DocNo
March 11, 2005 at 8:07 am
I generally use a function like this called with milliseconds as such:
Print Common.dbo.mSecsToHHMMSSmmm(DateDiff(ms,@StartTime,@EndTime))
Use Common
Go
If Object_Id('mSecsToHHMMSSmmm') is not Null Drop Function mSecsToHHMMSSmmm
Go
--------------------------------------------------------------------------------
-- Name:
-- mSecsToHHMMSSmmm
--
-- Description:
-- Converts the specified number of milli-seconds to HH:MM:SS.mmm...
March 8, 2005 at 8:49 am
Hmmm,
Just noticed that you were running 500000 rows... In that case the script runs in 29 seconds
February 16, 2005 at 8:14 am
Try something like this...
Set NoCount On
Declare @tbl Table(i1 Int,i2 Int,i3 Int,i4 Int)
Declare @i Int
set @i=0
While @i<50000 Begin
Set @i=@i+1
Insert @tbl values(@i,@i,@i,@i)
End
Select * into RealTable from @tbl
Create unique index IndexOnI1...
February 16, 2005 at 8:11 am
Doh!
It would appear that I can use the value of the SRV_PROC pointer as it
January 27, 2005 at 11:33 am
Try using the WITH(NOEXPAND) option in your query.
January 27, 2005 at 9:44 am
Viewing 15 posts - 151 through 165 (of 167 total)