Forum Replies Created

Viewing 15 posts - 4,246 through 4,260 (of 7,597 total)

  • RE: Computed column with leading static number

    Or:

    id bigint IDENTITY(12345000000000, 1) NOT NULL,

    ...

  • RE: Log flushes per second alert

    I'd be more concerned with log waits and/or dynamic log growth than with log flushes per second. If you're writing a lot of data, you will have a lot...

  • RE: Updating based on past records

    This code may give you some ideas. It looks at the most recent <nn> identical activities and averages them to get an estimate:

    declare @num_of_most_recent_activities_to_use_to_estimate int

    set @num_of_most_recent_activities_to_use_to_estimate = 5

    create table...

  • RE: Query calculation over a partition

    Typically I've found that DISTINCT is faster than GROUP BY when SELECTing a single column, i.e. as below, but obviously that could vary:

    SELECT DISTINCT

    ...

  • RE: need help redesigning this model

    There's extremely little detail here, but it seems as if you are not distinguishing between a course and a single offering of the course, which I'll call a "class" for...

  • RE: List All Permissions a User Has in SQL Server

    gary1 (1/13/2012)


    Thanks azdzn.

    In Oracle, from toad for Oralce, if we select a table and see the Script, it shows complte table script along with the grants

    But in SSMS, I can...

  • RE: Interview Questions

    Jeff Moden (6/16/2016)


    ScottPletcher (6/16/2016)


    Jeff Moden (6/15/2016)


    Sergiy (6/15/2016)


    Actually, your "simple question" does not have a correct answer.

    The only correct answer would be a question in response.

    Probably, more that one question in...

  • RE: Query to find tables with Forwarded Records

    Because sys.dm_db_index_physical_stats is so much overhead, you'll want to filter out non-heaps before you do the CROSS APPLY to that function.

  • RE: Interview Questions

    Jeff Moden (6/15/2016)


    Sergiy (6/15/2016)


    Actually, your "simple question" does not have a correct answer.

    The only correct answer would be a question in response.

    Probably, more that one question in response.

    Until your requirements...

  • RE: Mass Delete question

    I agree, definitely save, truncate and (re)load.

    Btw, you should very likely change the clustered index on the table to insert datetime if it's currently based on an identity column. ...

  • RE: Database Design question

    I'd use separate dbs rather than separate schemas. We are client-based as well, and some of our clients demand that their data is isolated from the data of all...

  • RE: Interview Questions

    Eric M Russell (6/15/2016)


    Jeff Moden (6/14/2016)


    Eric M Russell (6/14/2016)


    You'll rarely ever be asked pop quiz style questions like "What is a clustered index?" or "How do you get the...

  • RE: Interview Questions

    It's my understanding -- although I can't construct code right now that confirms it -- that:

    SET LOCK_TIMEOUT

    can cause that type of behavior. I had faith in that claim because...

  • RE: Interview Questions

    Sean Lange (6/14/2016)


    ScottPletcher (6/14/2016)


    My advanced knowledge, "tricky" q is:

    In autocommit mode, when can an UPDATE statement partially complete, some UPDATEs made, some not, where SQL does not roll it back?...

  • RE: Interview Questions

    My advanced knowledge, "tricky" q is:

    In autocommit mode, when can an UPDATE statement partially complete, some UPDATEs made, some not, where SQL does not roll it back?

    Edit: And...

Viewing 15 posts - 4,246 through 4,260 (of 7,597 total)