Forum Replies Created

Viewing 15 posts - 316 through 330 (of 557 total)

  • RE: Index and Optimiser question.

    GilaMonster (10/30/2015)


    Unlikely. It's fairly rare for SQL to scan a non-covering index and then do lookups, because it's hard for it to get accurate estimations. It's prone to scan the...

  • RE: Index and Optimiser question.

    ChrisM@Work (10/30/2015)


    You have this index definition in your first post:

    CREATE NONCLUSTERED INDEX IX_Large_Table_ABDFHJ ON dbo.Large_Table

    (A,B,D,F,H,J) WITH( STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]

    GO

    Why?

    2...

  • RE: Index and Optimiser question.

    ChrisM@Work (10/30/2015)


    Key lookups are always to the clustered index - but there's "Index intersect" which blurs the issue.

    In the question there was an ordering (the word 'then'), so the...

  • RE: Index and Optimiser question.

    The Question was:

    Can SQL-server use an index and then use the covering index to collect the data?

    (And therefore not using the 'main' table).

    Answers:

    GilaMonster (10/29/2015)


    No. Lookups are always to the clustered...

  • RE: Index and Optimiser question.

    GilaMonster (10/29/2015)


    No. Lookups are always to the clustered index.

    That will either use the index on F and do key lookups to the cluster or will scan the covering index if...

  • RE: Table Space growth based on each year

    Maybe a bit redundant now.

    Only a single database is targeted.

    Ben

    -- ben brugman

    -- 20151029

    --

    CREATE TABLE ##TableSizes (name sysname, rows varchar(16),

    reserved varchar(16), data varchar(16), index_size varchar(16),unused varchar(16))

    INSERT ##TableSizes

    EXEC sp_MSforeachtable...

  • RE: SQL Templates.

    Everybody thanks for your contribution.

    Especially; Kristen and William Mitchell.

    Allthough there is a difference is style for all solutions, there is also a large overlap in the different solutions. Clairly there...

  • RE: SQL Templates.

    Sorry for this late response.

    (Last few days I have had to take care of my elderly father who was hospitilized.).

    Depending on my work and my father I stil want to...

  • RE: SQL Templates.

    Kristen-173977 (10/9/2015)


    Sorry, because it, currently, relies on Metadata tables specific to our APPs it won't work standalone.

    I should try to find the time to make a generic version though ...

    Maybe...

  • RE: SQL Templates.

    GilaMonster (10/9/2015)


    SQLPrompt does all the column generation for inserts and selects. It's not free, but it's well worth the price in my opinion.

    Thanks, I do use this, but this is...

  • RE: Testing a script in SSMS supplied from SSRS.

    Progress update,

    Sorry that I can not post the actual code and or situation.

    As allready described the code has to be altered before it can be executed.

    There were some suggestions how...

  • RE: Testing a script in SSMS supplied from SSRS.

    ben.brugman (10/2/2015)


    ... not obtainable. ...

    ... I do not want to change the code itself, ...

    Jason A. Long (10/3/2015)


    ben.brugman (10/2/2015)


    Not unattainable at all... The only thing SSRS does...

  • RE: Testing a script in SSMS supplied from SSRS.

    Sorry, I think I was asking for something which is not obtainable.

    And I wasn't clear enough in my question.

    Because I want the code to cut and paste between the SSRS...

  • RE: ANY EASY WAY TO REDUCE THE CODE??

    WayneS (10/1/2015)


    The quickest, most sure-fire way to reduce the code would be to use CTRL+A followed by CTRL+X. :w00t::w00t:

    Good anwser.

    I would like to make a little change.

    Maybe it is...

  • RE: Is there a way to upivot the folllowing table dynamically

    Hello Luis Cazaras and others:

    This afternoon I got a request for a Pivot 'script', which would adjust to changes in a table. So I remembered the given solution on the...

Viewing 15 posts - 316 through 330 (of 557 total)