Viewing 15 posts - 256 through 270 (of 388 total)
I think the larger problem is just getting a list of stats from systables from each DB.
Do this
create table tempdb.dbo.MyStats( DBname sysname,tablename sysname,rows bigint)
EXEC sp_MSforeachdb 'USE ? insert into tempdb.dbo.MyStats...
May 29, 2015 at 7:31 am
How about doing an
update VendorCostPrefix09_ set SetCost=value, SetPrefix=Prefix--
where setcost <> value or setprefix<>prefix
Could be you are updating the entire table where maybe only 20 rows actually need the update.
Since...
May 29, 2015 at 7:12 am
looks like you are joining data sets between linked servers.
Try selecting the data into a temp table first before doing the ANSI-1989 old school style joins with unions.
May 29, 2015 at 7:00 am
You seem to get Model_Id from a window and pass it up to an outer window, and that value does not get used in a filter, join or select on...
May 29, 2015 at 6:39 am
Try using this query.
It should bring back info like, table, indexname, indexkey together with included columns, seeks, scans, lookups, rowlockcounts, rowblock counts, rowblock duration, page lock counts etc all together...
May 7, 2015 at 4:14 am
The table you gave us has
create table
.
.
[WEEKDAY_NUMBER] [int] NOT NULL,
.
.
INSERT INTO Date (DAY_WID, DAY_Date)
VALUES ('19000101','19000101') --9999-12-31 failed
Since you are not inserting into weekday_number, the insert must break.
This will...
May 5, 2015 at 6:32 am
I think the improvement is solely due to the changing of the clusterd index to be the date key as the non clustered index on date probably would not have...
May 3, 2015 at 4:37 am
Jacob Wilkins (5/1/2015)
May 1, 2015 at 4:15 pm
GilaMonster (5/1/2015)
SimonH (4/30/2015)
I clearly need to find some time to re-write this procedure.
Not for the reason you posted.
Temp table caching is a feature, it's designed to reduce the overhead when...
May 1, 2015 at 4:01 pm
I would [select object_name(id),* from sysindexes where object_name(id) = 'mytable'] or [select object_name(object_id),* from sys.indexes where object_name(object_id) = 'mytable'] to find the fillfactor.
completely script out all the indexes on...
May 1, 2015 at 3:46 pm
will this work?
SELECT RecordID, contactID, forename, surname, cliNumber, ranked_value
FROM ( SELECT RecordID, contactID, forename, surname,
...
April 30, 2015 at 10:46 am
I somehow forced the sort to be earlier by doing this
DECLARE @id INT = DB_ID('MyDB')
SELECT DISTINCT
SP.spid, LoginId = LEFT(SP.loginame, 50), HostName =...
April 30, 2015 at 10:34 am
If you specify PF within table definition, it automatically marks the columns as not null.
If you don't, then you have to specify not null for each column first so that...
April 30, 2015 at 10:10 am
ramana3327 (4/30/2015)
One of our Production database is using default isolation Readcommitted.
The transactions also using readcommitted. But we want change isolation level to read comitted snapshot isolation and test it to...
April 30, 2015 at 8:12 am
Viewing 15 posts - 256 through 270 (of 388 total)