Forum Replies Created

Viewing 15 posts - 14,491 through 14,505 (of 14,953 total)

  • RE: Huge table, optimization opinions welcomed

    I just remembered that you can't create an index on a view with a Union operator in it. I'll have to test with Union All (BOL wasn't expicit about...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: X Highest Price........

    Depending on how you count it, Dense_Rank might be better than Rank in a situation like this.

    For example, if you have a tie for first place, the second highest number...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: SELECT WITH NOLOCKS

    Per BOL:

    All queries, including those with READUNCOMMITTED and NOLOCK hints, acquire Sch-S (schema stability) locks during compilation and execution. Because of this, queries are blocked when a concurrent transaction holds...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: DB Backup plan to be made as append or overwrite

    This is a duplicate post.

    http://www.sqlservercentral.com/Forums/Topic472721-149-1.aspx

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Maintainance plan 2005

    I haven't run into the file corruption issue, but I can see that separate files would make sense.

    Since the point is to avoid accidentally getting rid of a backup when...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Huge table, optimization opinions welcomed

    If the Parent/Child tags are meant to be significant, then storing two rows kind of defeats that purpose.

    An indexed view might be your best bet.

    create view Friends

    with schemabinding

    as

    select parentid as...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Maintainance plan 2005

    It depends on what you need.

    Your full backups and log backups should generally be apended. And the prior day's backups should be on tape (or some other separate medium),...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Temporary Tables

    Really, it depends on what you're using them for. But it's often considered a good practice to use temp tables instead of table variables, because the advantages for table...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Splitting Database

    You can use sys.all_objects.

    select name

    from sys.all_objects

    where type in (

    'c', -- check constraints

    'd', -- default constraints

    'f' -- foreign keys

    )

    That will give you a list of all of those objects. Wrap...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing

    No. You haven't missed anything. It's unneccessary to use the While loop on that. I do it as a practice, because there are times when I use...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Moving System Databases

    This question makes no sense, and the answer doesn't clarify anything.

    When moving system databases, I can't find any documentation that says it has to be in a particular order. ...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Transaction count after EXECUTE indicates that a COMMIT or ROLLBACK TRANSACTION statement is missing

    To catch those, put a Try/Catch in the called proc.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Logging with XML

    That makes sense.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Logging with XML

    "Don't forget... if you want to do full row auditing, then your database will be at least 2 times the original size you planned for. 500 gig db suddenly...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • RE: Logging with XML

    Perhaps I should be more clear on how often this data is used.

    Today's updates are rarely needed for anything. The occassional, "I updated the wrong account, and now I...

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 15 posts - 14,491 through 14,505 (of 14,953 total)