Forum Replies Created

Viewing 15 posts - 931 through 945 (of 1,518 total)

  • RE: Need help re-organizing query - if possible - so it is more efficient

    Jeff Moden (9/6/2008)


    Heh... if YOU had a question on what it does, others will to. Time to break out the grossly underused "dash dash" function. 😉

    I still don't fully...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Linked Server

    talentguy123 (9/5/2008)


    I tried doing a select from the remote database and it actually works.But when I do an update referencing the linked server it says 'MS OLEDB unable to start...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    Peso (9/5/2008)


    What the query does, is that it select all records where coID is not NULL and where ccbID = 100000.

    For this set of records, the query then group them...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    Peso (9/5/2008)


    Thank you for the feedback.

    It's nice to see the query went from about 800 ms / 15500 reads down to 15 ms / 56 reads.

    The only drawback I see...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    Thank you for all this work!

    I will talk to the developer about changing the query accordingly.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    I'm sorry, you are absolutely right, this does work indeed (returns 2 rows as expected):

    select * from test1

    left join test2

    on test1.corpoid = test2.corpoid

    where test1.corpoid is NOT null and test2.corpoid is...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    PW (9/4/2008)


    >>but then the filter "D2.CORPOID IS NULL AND D.CORPOID IS NOT NULL" negates the join! The query will never return any rows!

    Nope, that's not true in this case.

    The check...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    It's just dawned on me that the original query makes no sense!

    The D and D2 tables are joined (left join) on the COID column, but then the filter "D2.CORPOID...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    Here is the plan of the original query (pls see attached).

    I will now try the suggested modified query and will post the plan shortly.

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    Grant Fritchey (9/4/2008)


    First thing I see, do you reall need to do a left join to that sub-select. If I'm seeing the logic correctly, it's looking for any of the...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    Peso (9/4/2008)


    Marios Philippopoulos (9/4/2008)


    SELECT

    D.COID

    ,MIN( D.COTID )

    FROM

    dbo.tblName AS D

    LEFT JOIN

    dbo.tblName AS D2

    ON

    D.COID = D2.COID

    WHERE

    D.CCBID = 100000 AND

    D.CCBID = D2.CCBID AND

    D2.COID IS NULL AND

    D.COID IS NOT NULL...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Need help re-organizing query - if possible - so it is more efficient

    Grant Fritchey (9/4/2008)


    First thing I see, do you reall need to do a left join to that sub-select. If I'm seeing the logic correctly, it's looking for any of the...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Should non-clustered indexes be placed on separate physical device than data?

    Grant Fritchey (9/4/2008)


    We go through the same worries about SANS all the time. You're completely dependent on your SAN admins to set up the drives appropriately and maintain them well....

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Should non-clustered indexes be placed on separate physical device than data?

    I know very little about SANs but one thing that's always bothered me is the fact that multiple drive letters in each server can be striped across a single physical...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

  • RE: Server

    sudhakara (9/3/2008)


    How much memory is on the server? 16 GB

    What's sQL's max memory setting? 10 GB

    What else in running on the...

    __________________________________________________________________________________
    SQL Server 2016 Columnstore Index Enhancements - System Views for Disk-Based Tables[/url]
    Persisting SQL Server Index-Usage Statistics with MERGE[/url]
    Turbocharge Your Database Maintenance With Service Broker: Part 2[/url]

Viewing 15 posts - 931 through 945 (of 1,518 total)