Forum Replies Created

Viewing 15 posts - 2,431 through 2,445 (of 14,953 total)

  • RE: Nested Set Optimization Fun and Sunshine

    That makes sense.

    The way I do that is generate a "breadcrumb path" for each node, using a simple recursive CTE. Pad the parent IDs with leading 0s, and either...

    - 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: Order by in stored procedure

    Formatted:

    SELECT cal.datevalue,

    DATENAME(DW, cal.datevalue) day_of_week,

    ISNULL(flowon.sum_flow_on, 0) flow_on,

    ...

    - 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: Is There Any Reason I Should NOT enable READ_COMMITTED_SNAPSHOT?

    Michael Valentine Jones (12/28/2011)


    GSquared (12/28/2011)


    Michael Valentine Jones (12/28/2011)


    GSquared (12/28/2011)


    Michael Valentine Jones (12/28/2011)


    I don't see how RCS would be a problem in a data warehouse\datamart application.

    If there are no inserts/updates/deletes happening,...

    - 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: Is There Any Reason I Should NOT enable READ_COMMITTED_SNAPSHOT?

    David Moutray (12/28/2011)


    RCSI wouldn't permit dirty reads, but it would permit non-repeatable reads and phantom reads. Since the required overhead for the Temp DB is significant, I want to...

    - 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: One of the worst examples of 3rd party SQL I've ever seen

    ben.rosato (12/28/2011)


    GSquared (12/28/2011)


    If I'm reading it correctly, it's pretty much just a "Where in (values)" statement with as close to unlimited number of allowed values as they felt they could...

    - 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: Are the posted questions getting worse?

    Evil Kraig F (12/28/2011)


    Merry Christmas all. Disappeared for a week and only 2 pages on the Thread when I came back! Y'all were slackin'! Of course, 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

  • RE: Locks

    The difference between S and U is that multiple connections/transactions can take an S lock on data, but only one can take a U lock on something at a time....

    - 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: Order by in stored procedure

    drew.allen (12/28/2011)


    GSquared (12/28/2011)


    I'd prefer to see the query that gets a syntax error, and fix that first, and then worry about optimization and standardization next.

    I don't think it's that easy...

    - 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: Nested Set Optimization Fun and Sunshine

    Are you in a position whereby you can "fall back and punt" on this?

    This is definitely a case where a nested sets hierarchy will save the day performance-wise.

    Here's some data...

    - 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: Order by in stored procedure

    drew.allen (12/28/2011)


    There may not be syntax errors, but there are lots of logical errors. For instance, the table clean_cust_account_lcd_cancel_switch is queried three separate times when it looks like it...

    - 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: Is There Any Reason I Should NOT enable READ_COMMITTED_SNAPSHOT?

    Michael Valentine Jones (12/28/2011)


    GSquared (12/28/2011)


    Michael Valentine Jones (12/28/2011)


    I don't see how RCS would be a problem in a data warehouse\datamart application.

    If there are no inserts/updates/deletes happening, then there are no...

    - 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: Nested Set Optimization Fun and Sunshine

    Hate to say it, but this is the Internet, and I don't open files that could contain auto-executable code from unknown sources.

    Can you either post the code in the forum,...

    - 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: Order by in stored procedure

    No syntax error in that.

    - 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: Order by in stored procedure

    The usual:

    SELECT columns

    FROM tables/views/etc

    WHERE criteria

    ORDER BY columns

    Can you post the stored procedure? If so, we can take a look at it and see if we can spot the error.

    - 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: How to find DB changes ??

    Exactly.

    But if data changes matter to the business, it might be worth digging into. Might not as well. Depends on what they need, why they need it, and...

    - 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 - 2,431 through 2,445 (of 14,953 total)