Forum Replies Created

Viewing 15 posts - 1,456 through 1,470 (of 5,841 total)

  • RE: Tracking SQL Page File Usage - Values appear incorrect.

    I am with Gail. Page files on SQL Servers should NEVER be used when things are set up correctly, and I advise my clients to make them just big enough...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: cumulative average without cursor

    This should be sent off to Itzik Ben-Gan as a puzzler to work out for an article on SQLMag.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Fastest way to apply primary key on a huge table so downtime is minimal?

    I think you have a great plan, with a few conditions:

    1) Are the rows in the original table just ADDED or are there also UPDATES and DELETES? If just the...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: t-sql 2012 merge statement insert statement incorrect

    I don't think we can help you without create table scripts, representative data inserts and your actual and expected results from the statement execution.

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Query taking time

    1) Asking for all columns from every table.

    2) We need additional info to really help. Table create scripts (with indexes), row counts, query plan.

    3) Leading percent on the like....

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Table Variable in Stored Procedure

    PJ_SQL (7/29/2015)


    What is the purpose of creating table variable and inserting data into it and selecting from table variable inside of stored proc?

    Why can't the stored proc just have select...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: How many maximum number of databases are recomended to add in AlwaysON Availability Group SQL Server 2012

    Imran-Yasir (7/29/2015)


    Hi,

    Can anybody please tell me that how many databases are recomended to add in one AG in SQL Server 2012 AlwaysON to get better...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: cumulative average without cursor

    I am on the last day of a cruise vacation and pretty much brain-dead, but I think this does the trick, although I am not certain you want to use...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Query performance

    Junglee_George (7/29/2015)


    Hi Kevin

    It will be useful if you can explain me with some code change example, in the way that will benefit the query performance.

    You provided the code change already....

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Query performance

    Junglee_George (7/28/2015)


    I have these SQL statements inside a WHILE loop :

    SET @StartDate1 = (SELECT MIN(A.startdate) FROM #Activities2 AS A WHERE activityIncId = @ActId )

    SET @EndDate1 = (SELECT MAX(A.enddate) FROM...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Rolling 12 mo AND Prior Rolling 12 mo Query

    This should be able to be done with WINDOWING functions since you are on SQL 2012. I bet I could also do it very quickly and efficiently using DATEADD and...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: SQL Performance Issue

    1) You have what are almost certainly views in that query, so G-d only knows what the decompiled query looks like. I have seen queries like that net out to...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Stored Procedure to Update and Insert in single SP

    http://michaeljswart.com/2011/09/mythbusting-concurrent-updateinsert-solutions/

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Stored Procedure to Update and Insert in single SP

    http://michaeljswart.com/2011/09/mythbusting-concurrent-updateinsert-solutions/

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Server-side vs App-side

    rmechaber (7/17/2015)


    Another perspective: do you actually need to store the subtotal in the OrderHeader table?

    This could be computed on-the-fly using views or stored procedures from the actual order details, right?...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 15 posts - 1,456 through 1,470 (of 5,841 total)