Forum Replies Created

Viewing 15 posts - 1,051 through 1,065 (of 6,036 total)

  • RE: Index Reorg/Rebuild Maxes out log file

    There is no way to tell the exact number, but a rough estimation would be 3 times the size of the table, including all the indexes.

    In case of 52GB table,...

  • RE: Enterprise Edition DB not growing despite available disk space

    chrisfradenburg (11/22/2016)


    A reorg can only move pages withing the file that they're in. I would need to do a rebuild or drop and create to handle this. We're...

  • RE: What is Normal?

    Ed Wagner (11/22/2016)


    Sergiy (11/22/2016)


    RonKyle (11/22/2016)


    Use a natural key in OLTP designs when possible.

    What is you natural key for "person" records?

    There isn't one. Anything about a person...

  • RE: What is Normal?

    RonKyle (11/22/2016)


    Use a natural key in OLTP designs when possible.

    What is you natural key for "person" records?

  • RE: Trigger causing deadlocks

    The logic for UPDATE action is not so clear to me.

    What outcome is expected after updates?

    Does "last record" mean "last changed"?

  • RE: Trigger causing deadlocks

    I guess this trigger would do what you want to do:

    CREATE TRIGGER dbo.trg_MakeLatestRecordActive ON dbo.Records

    FOR INSERT, UPDATE

    AS

    UPDATE R

    SET Active = CASE WHEN R.RecordID = i.LastRecordID THEN 1 ELSE 0...

  • RE: Trigger Question - Update not working for my situation

    Why do you need this part?

    BEGIN

    Update X_POPDateChange set NEWDATE=inserted.REQDATE

    from inserted

    END

    I believe it can be simply removed.

  • RE: Temp tables in transaction

    Thanks everyone for positive feedbacks.

    For myself I use a simple rule of thumb here:

    table is a table, even if it's a temporary one, and within transactions it acts as a...

  • RE: What random trash is in your drawer?

    For couple of years I had a can of tuna in my drawer.

    I did not put it there, I inherited it together with the drawer from a collegue who left...

  • RE: Are the posted questions getting worse?

    Hugo Kornelis (11/10/2016)


    Sergiy (11/10/2016)


    ThomasRushton (11/10/2016)


    ehh.... well, the CTPs for SQL2012 ("Denali") started in November 2010, and the RTM was Q1 2012, so it's possible to have over 4 years experience...

  • RE: Are the posted questions getting worse?

    ThomasRushton (11/10/2016)


    ehh.... well, the CTPs for SQL2012 ("Denali") started in November 2010, and the RTM was Q1 2012, so it's possible to have over 4 years experience with SQL Server...

  • RE: Are the posted questions getting worse?

    Jeff Moden (11/6/2016)


    Luis Cazares (11/2/2016)


    I'm not looking for a job, but I take a look at offers from LinkedIn every now and then just to see what's being offered/requested.

    That said,...

  • RE: Datetime vs. Datetime2

    Let's create a test table:

    SELECT CONVERT(DATETIME, tg.N ) DT, CONVERT(DATETIME2, DATEADD(dd, N, '19000101')) DT2

    INTO #Dates

    FROM dbo.TallyGenerator(0,1000000, NULL, 1) tg

    CREATE INDEX IX_DT ON #Dates(DT)

    CREATE INDEX IX_DT2 ON #Dates(DT2)

    Now run the performance...

  • RE: Datetime vs. Datetime2

    SELECT CONVERT(DATETIME, 42335)

    So convenient.

    Especially when you need to generate a range of dates from a Tally table.

    SELECT CONVERT(DATETIME2, 735930)

    Ooops...

    SELECT GETDATE() - 1

    Easy.

    SELECT SYSDATETIME() - 1

    Ooops...

    Well, if you love...

  • RE: Big data: transfer x-number of rows per batch?

    Jeff Moden (11/7/2016)


    Sergiy (11/2/2016)


    The fastest data transferring channel is a truck loaded with DVD's

    :hehe:

    Or an overnight care package with a monster hard disk in it. 😀 Did that when...

Viewing 15 posts - 1,051 through 1,065 (of 6,036 total)