Forum Replies Created

Viewing 15 posts - 406 through 420 (of 608 total)

  • RE: Updating Covering Indexes

    Hi Chris,

    I'm more curious about the logical reads rather than the execution time. I tried my test script again, but rebuilding all indexes before the update, but saw no noticeable...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: DATABASEPROPERTYEX and the IsSubscribed property

    That property (and the column in sys.databases) does not work. You can check the distribution database for that info.

    SELECT

    *

    FROM

    distribution..MSsubscriptions

    WHERE

    subscriber_db = 'SubscriberDB';

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Temp Table Column name or number of supplied values does not match table definition

    Create Table #stage(

    RecoverUnitId int

    , FileID int

    , FileSize bigint

    , StartOffset bigint

    ,...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: T-SQL Variable vs String Equivalent

    j.miner (4/8/2013)


    Maybe I'm misunderstanding param sniffing, but isn't the optimizer going to generate a plan and keep it until something changes (index rebuilt\reorg, stats update, table records added\deleted, etc...), and...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: DBCC Shrinkfile issues

    If you have LOB data your shrink will be slow

    http://www.sqlskills.com/blogs/paul/why-lob-data-makes-shrink-run-slooooowly-t-sql-tuesday-006/

    Paul Randal's shrink alternative is the method I use when I have to reclaim space from my files.

    http://www.sqlskills.com/blogs/paul/why-you-should-not-shrink-your-data-files/

    So what if you...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: sequencial insert

    Like this?

    CREATE TABLE MyTable

    (COMCOD SMALLINT,

    SIRCODE BIGINT IDENTITY(1802000001000, 1000),

    DESCRIPTION VARCHAR(255));

    GO

    INSERT INTO MyTable (COMCOD, DESCRIPTION)

    VALUES

    (3306, 'A'),

    (3306, 'B'),

    (3306, 'c'),

    (3306, 'd');

    GO

    SELECT

    *

    FROM

    MyTable;

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Warning - Columns With No Statistics

    I had a chat to Gail at the user group last night and it turns out that the warning can be ignored. The columns that have no statistics are not...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Auto Update Statistics Asynchronously option

    That setting only specifies whether your queries will wait for stats to be compiled or will use stale stats.

    The setting to control auto update is "AUTO UPDATE STATISTICS". Auto update...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Just accepted a Sr. DBA job. Time for a gut check?

    I would enjoy reading a follow up in a months time, it certainly should be a shorter read if anything.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: What's wrong in this .. simple calculations

    This behaviour is due to data type precedence.

    (@v1 / @v2 ) * @v3 will return smallmoney

    ((@v1 * 1.0) / @v2 ) * @v3 will return numeric

    This can be demonstrated like...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: T-SQL Cursors

    This sounds like an issue for the presentation layer and not the data layer.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Clustered Index

    A good question, but also a little concerned about the option of defrag. The tables has 0 pages, I have no idea how you would fragment nothing.

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Statistics - ' Auto Update Statistics ' - 'Auto Update Statistics Asynchronously'

    Lesser of two evils really.

    Auto Update Asynch OFF - Queries wait for stats to be built

    Auto Update Asynch ON - Queries use stale stats

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Can This Work?

    The question is "Will this code execute successfully?"

    and the only possible answer is "NO".

    Msg 111, Level 15, State 1, Procedure sp1, Line 11

    'CREATE/ALTER PROCEDURE' must be the first statement in...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

  • RE: Best way to store data in table

    Kingston Dhasian (2/21/2013)


    Sean Pearce (2/21/2013)


    INSERT INTO PseudoTable VALUES ('Tear,Bike,Monkey')

    SELECT * FROM PseudoTable WHERE Item LIKE '%tea%'

    1 row returned.

    INSERT INTO PseudoTable VALUES ('Tear')

    INSERT INTO PseudoTable VALUES ('Bike')

    INSERT INTO PseudoTable VALUES ('Monkey')

    SELECT...

    The SQL Guy @ blogspot[/url]

    @SeanPearceSQL

    About Me[/url]

Viewing 15 posts - 406 through 420 (of 608 total)