Forum Replies Created

Viewing 15 posts - 4,651 through 4,665 (of 5,841 total)

  • RE: Allocate payments on a LIFO basis

    Hey - if it is acceptable for your purposes that is all that truly matters. Well, at least until your data volumes grow a bit! 🙂

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

  • RE: Allocate payments on a LIFO basis

    Triangular joins anyone? Search this site for stuff about that.

    Have you tried this with 1M or even 100K rows in the table? Just scanned quickly so if I...

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

  • RE: isdate priority

    shamassaeedmr (7/28/2009)


    First convert the chardate into date format then you can apply all date functions you want.

    convert(datetime,chrdate,103)

    What happens to your query when chrdate isn't actually convertable to a datetime datatype??

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

  • RE: Best File Allocation Unit Size

    Probably more important than cluster size is sector alignment of the partition itself. Review all the stuff here for details: http://blogs.msdn.com/jimmymay/archive/2008/10/14/disk-partition-alignment-for-sql-server-slide-deck.aspx

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

  • RE: MSDB log file size is 17GB?????

    LOTS of other things make MSDB grow, such as backups, restores and job executions. IIRC, isn't msdb set to SIMPLE mode by default during installation?

    In any case...

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

  • RE: Issue with reorganizing and rebuilding indexes

    Just as a follow-up you probably want to check to make sure none of your other databases are set to autoshrink (or autoclose for that matter). 🙂

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

  • RE: SPROC Running Slower after Changing from Dynamic SQL

    Dynamic SQL has EXPLICIT values for stuff in the where clause, and thus the optimizer has the exact information it needs to get accurate statistics and put together the optimum...

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

  • RE: GUID or Int is the best for primary key columns?

    David.Poole (7/16/2009)


    The problem with a compound key where one of the fields is a ServerId is when you are running a disaster recovery site.

    You have to remember NOT to synchronise...

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

  • RE: Date functions causing queries to take longer

    Grant Fritchey (7/16/2009)


    TheSQLGuru (7/16/2009)


    "hints" is a very broad topic. Did the OPTION RECOMPILE get used widely and cause issues, or are you lumping that in with things like FORCE...

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

  • RE: Date functions causing queries to take longer

    Grant Fritchey (7/16/2009)


    Jeff Moden (7/16/2009)


    Think "parameter sniffing" to determine how far you'd carry the approach and when you can least afford for it to occur.

    Yes, true. But there's good &...

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

  • RE: GUID or Int is the best for primary key columns?

    AmolNaik, did you read the thread completely? I think everything you said had already been covered, most of it more than once. 🙂

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

  • RE: Date functions causing queries to take longer

    Grant Fritchey (7/16/2009)


    TheSQLGuru (7/16/2009)


    I think we will have to disagree on this one. I estimate that 90+% of the time a user has a query with a date range...

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

  • RE: GUID or Int is the best for primary key columns?

    JohnG (7/16/2009)


    SQL Server GUIDs are Version "4" (random) and not Version "1" (MAC address).

    An advantage for using GUIDs in a .Net application is that the value can be generated anywhere...

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

  • RE: Date functions causing queries to take longer

    Grant Fritchey (7/16/2009)


    I don't know that I'd recommend recompiling out of hand. The execution plan using a parameter is going to sample the appropriate indexes and arrive at a generic...

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

  • RE: non clustered index question

    Ian Scarlett (7/15/2009)


    Is it better to first drop the indexes, then truncate the table and recreate the indexes at the end of the inserts?

    Absolutely... performance of the inserts should...

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

Viewing 15 posts - 4,651 through 4,665 (of 5,841 total)