Viewing 15 posts - 3,061 through 3,075 (of 6,036 total)
It's better to have it as a constraint:
create table tlb_test (
id int identity(1,1), -- if you need it ???
RefType varchar(20) null,
EngCode varchar(20) null,
...
May 7, 2008 at 8:41 pm
NULL is a kind of wildcard.
If you run "DIR *.*" you get list of all files with any name and any extention.
But if you run "DIR *. " you get...
May 7, 2008 at 7:24 pm
No need to manage transactions or update with deleted values.
Just raise an error.
Error raised inside of trigger will roll back everything, including UPDATE/INSERT itself.
May 7, 2008 at 4:48 pm
Each insert is separate transaction.
Which involves locks, reindexing, etc.
1st option (union all) create single transaction.
2nd option creates as many transactions as many rows being inserted.
May 7, 2008 at 3:04 am
Does not really matter.
If table is heavily used it will be sitting in memory anyway because of its small size.
If it's used occasionally those microseconds needed to read extra extent...
May 7, 2008 at 1:20 am
Matt Miller (5/6/2008) I just didn't think Sergiy knuckled under to office politics...:hehe::w00t:
Well, I'm probably lucky, but I'm not THAT lucky.
I'm not sure there is any scientific proof that such...
May 6, 2008 at 10:51 pm
Save space?
Heh...
Ask him: how much space?
Then, how much this space will cost?
Then give him 5 bucks and BUY that space for yourself.
😎
May 6, 2008 at 8:14 pm
1. and 2. PK Clustered is on N.
3. All of them. Table is static - so there is no harm in over-indexing.
Yes, there are composites: WeekOfMonth + Date,...
May 6, 2008 at 6:55 pm
My "essential" Tally table contains not only numbers but column of characters ( NCHAR(N) ), dates ( DATADD(dd, N, 0) and other date related values (DW, day of year, week...
May 6, 2008 at 5:43 pm
Now try to estimate performance of updates ad inserts on this table.
Take into account locks to be applied not only on table pages but on index pages as well.
May 6, 2008 at 2:54 pm
Replace IIf([Extension]<50,"0" & [Extension],[Extension])
with CASE WHEN [Extension]<50 THEN '0' + [Extension] ELSE [Extension] END
Should be all right then.
May 5, 2008 at 10:25 pm
Query from my version of the table will look like this:
SELECT *
FROM t_all_combination T0
WHERE EXISTS (
select 1
from t_all_combination...
May 5, 2008 at 3:05 pm
RBarryYoung,
the way you used NOLOCK makes it's a table alias.
To make it a table hint you must use (NOLOCK), better (WITH NOLOCK)
May 2, 2008 at 11:56 pm
rbarryyoung (5/2/2008)
Sergiy: Shouldn't that be something like this?:
I guess (can only guess here) OP is interested in id and date values only.
If it's true then my query will give...
May 2, 2008 at 5:58 pm
Effective query starts from CREATE TABLE statement.
The way the table is built there is no way to get fast response on a query like yours.
Convert it into something like this:
CREATE...
May 2, 2008 at 5:24 pm
Viewing 15 posts - 3,061 through 3,075 (of 6,036 total)