Viewing 15 posts - 5,341 through 5,355 (of 7,499 total)
well maybe, just maybe, ... since you're on SQL2005 ....
you may want to add a computed_column of the datetime datatype and put an index on it.
check BOL
ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/8d17ac9c-f3af-4bbb-9cc1-5cf647e994c4.htm
create table tmpTb...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 16, 2008 at 6:07 am
Quit logic..
If you convert your day / month / year column to int you will get
01012008
21012008
01022008
15022008
and it is integer, so there is no knowlage of date nor time.
So you...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 16, 2008 at 3:58 am
Unless you have strict rules for temptb's I wouldn't rely on "they have the same definition" :ermm:
You can off course always test the existance using
select OBJECT_ID('tempdb..#mytmpTb')
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 15, 2008 at 8:22 am
Maybe dbcc opentran can help you a bit.
ado.connection.begintran causes sqlserver to swap to "implicit transactions". That may not be the effect you wanted because you have to add...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 15, 2008 at 8:17 am
just a thought ...
You figured out sqlagent's roles .. that will be OK.
Maybe the logon-triggers can help you out ( need to be on sp2 ) so you can kick...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 15, 2008 at 8:12 am
If your scope is only the local proc, try to use table variables
declare @tmptb table (colx ... )
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 15, 2008 at 8:04 am
You've user a tablevariable. That is only available in your own session.
A global temptb (##tb) will fix this.
Keep in mind this affects multiple threads using the same temp object !
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 15, 2008 at 1:02 am
you could off course immediatly connect to the correct database
- add -d yourdbname to the commandline
- add set nocount on at the beginning of your script to avoid the...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 15, 2008 at 12:38 am
So you are shrinking the value range !?!
So it can nolonger store existing content !
Currently it is of type numeric(16, 2).
I executed the command:
ALTER TABLE table1
ALTER COLUMN field1 numeric(16,5) NULL
Max...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 15, 2008 at 12:31 am
as long as you don't send me the bills, I'm happy with that. :hehe:
Indeed SQL2005 has some nice new stuff...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 14, 2008 at 8:17 am
Grant Fritchey (1/14/2008)
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 14, 2008 at 8:07 am
you could use :
In your proc just set the dateranges (could use an available index (sargeble))
select ...
from yourobject
where mydatetimecol between @dateBegin
and @dateEnd
or
use the less performant ...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 14, 2008 at 7:37 am
A user(id) can connect multiple times.
So indeed a user can block himself (if he has more than one connection)
There have been issues with parallelism where one SPID ( a single...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 14, 2008 at 7:31 am
on the other hand,
if you use identity in your column definition, sqlserver will generate the next number for you.
And with sql2005 you could just add
OUTPUT [yourIDcolumn]
to your statement...
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 14, 2008 at 7:22 am
I'd first of all suspect the way the proc's parameters are defined in the vb.net app.
( http://www.sqlservercentral.com/scripts/Miscellaneous/31639/ )
Avoid implicit conversions !
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data and code to get the best help
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Who am I ? Sometimes this is me but most of the time this is me
January 14, 2008 at 12:37 am
Viewing 15 posts - 5,341 through 5,355 (of 7,499 total)