Forum Replies Created

Viewing 15 posts - 256 through 270 (of 389 total)

  • RE: SQL tables and rows counts PIVOT

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Increase Update Speed

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Execution Plan Help Needed!

    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.

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Tuning expensive query III

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Indexes Fragment Really Quickly

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: FILL dim.Date

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: How a new partition Function apply for Current Data

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Temp Tables Persisting in the TembDB

    Jacob Wilkins (5/1/2015)


    As I understand it, you probably should run CHECKDB against tempdb, since corruption can occur, and the files aren't zeroed out on restart, so the corruption can stick...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Temp Tables Persisting in the TembDB

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Indexes Fragment Really Quickly

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Tricky query issue

    will this work?

    SELECT RecordID, contactID, forename, surname, cliNumber, ranked_value

    FROM ( SELECT RecordID, contactID, forename, surname,

    ...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: New SQL 2012 R2 SP2 Cluster - Slow Performance - Bad Query Plan - High CPU

    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 =...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Creating Primary Key on temporary table question

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

  • RE: Changing isolation level

    ramana3327 (4/30/2015)


    Hi,

    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...

    Catch-all queries done right [/url]
    Gail Shaw's Performance Blog[/url]

Viewing 15 posts - 256 through 270 (of 389 total)