Forum Replies Created

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

  • RE: Tools to Search Database for Values

    Hello,

    In the past I created a number of search routines.

    This was quite a jumble in different styles.

    Now I have bundled the search routines in a stored procedure and the master...

  • RE: Index and Optimiser question.

    ChrisM@Work (11/2/2015)

    Can you share a couple of your queries (obfuscated, of course)?

    Sorry at the moment I do not see a feasible way to do this within a limited amount of...

  • RE: Index and Optimiser question.

    Just did a checkup on the tables which inspired this thread.

    The actual number of columns in the 'covering index' was 10. And yes they are all used in the actual...

  • RE: Index and Optimiser question.

    GilaMonster (11/1/2015)

    Columns included are in the leaf level only, not the key, so the index is smaller than if they were in the key.

    They also don't count towards the 900...

  • RE: Shocked. (A Halloween Horror story.)

    Jeff Moden (10/31/2015)


    To be honest, I'd say the quote about "half full" is incorrect, at least about the implementation for Microsoft's interpretation of the Rushmore Engine (the basis of SQL...

  • RE: Index and Optimiser question.

    Alexander Suprun (10/30/2015)There is only one way to force optimizer to do want we want, but we have to use table twice in our query, which becomes cumbersome and not...

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

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