Forum Replies Created

Viewing 15 posts - 1 through 15 (of 26 total)

  • RE: Clustered Indexes? Sedimentary, my dear Watson

    It's good to see such sensible advice here. Yes, a table should always have a clustered index, and IMO an Identity helps solve many of the issues with page splits...

  • RE: need script to kill user SPIDS

    I absolutely agree with the previous post about set single user. If you have to do this on a per database level then it is totally low rent.

    I had...

  • RE: Generating a Sequential Pattern

    Or better yet

    update SequenceTable

    set @NewSequenceNumber = CurrentSequenceNumber = CurrentSequenceNumber + 1

    where SequenceYear = year(getdate())

    Having said that, central locations for keys are a concurrency nightmare for anything that needs to...

  • RE: Eliminating Cursors

    As for why cursors are percieved as bad in SQL Server, it's simply about performance. SQL is optimised for set based operations. 'Never use cursors' is not a rule, but...

  • RE: Eliminating Cursors

    I think it's worth making the point that this approach does nothing to combat what is fundamentally bad about cursors. All we have done here is created a cursor, without using...

  • RE: UK Members: Seminar: Fabian Pascal

    I for one would be very interested in attending a session by Fabian. It's always good to test out some challenging ideas with others in the same field, controversial...

  • RE: Risk in the stored procedure below

    Sorry, I had a typo. Here is an example:

     

    CREATE

    TABLE ids ( id int)

    GO

  • RE: Risk in the stored procedure below

    Here is a better approach.

    CREATE PROCEDURE Get_New_ID

    @Prefix varchar(2)

    AS

    DECLARE @New_id INT --Assuming this is an int

    UPDATE TABLE_ID

    SET @new_id = currId = @currentId + 1

  • RE: Finding the Next Business Day Recursively

    One thing to note.

    @@Datefirst is affected by things like the defaultlanguage property of your language.

    I believe that for the US @@Datefirst defaults to 7, whereas if you set up...

  • RE: CPU "sleeping" when executing queries

    Another reason maybe that you have a bottleneck elsewhere that is slowing things down.

    Have had a look at the following counters:

    Logical Disk: Avg. Disk sec/Transfer -

    Logical...

  • RE: sql server 2000 an w2003 server

    SQL Server 2000 should run just fine on Win2k3.

    Do you have any more information regarding the configuration of the server. Is there nothing all in the errorlog?

     

     

  • RE: Random Number Generator in SQL Server?

    Paul's approach can be used highly effectively if you have a table full of integers. Just use Top 1 and the filter criteria, and you can use it whereever you...

  • RE: CPU "sleeping" when executing queries

    Hold on a second.

    You have configured cost threshold for parallelism to be 1. You also have prioirty boost tuned on

    This means that any query that will take more than a...

  • RE: CPU "sleeping" when executing queries

    I would start turning off priority boost (a strange thing to turn on), and then set max and min server memory back to the defaults (just to get things on...

  • RE: CPU "sleeping" when executing queries

    Hold on.

    These tables have 1000 rows? Really? How large is the database (run sp_spaceused when in the database and send the output.

    I very much doubt that sql will be...

Viewing 15 posts - 1 through 15 (of 26 total)