Forum Replies Created

Viewing 15 posts - 31 through 45 (of 73 total)

  • RE: How To Get Table Row Counts Quickly And Painlessly

    matt stockham (9/2/2009)


    rja.carnegie (9/2/2009)


    Why doesn't "SELECT COUNT(*) FROM table" look at an index, which apparently it doesn't(?)

    It should pick the smallest index (by page reads).

    The ESTIMATED execution plan says it's...

  • RE: How To Get Table Row Counts Quickly And Painlessly

    I find the report of DBCC CHECKDB useful.

    Why doesn't "SELECT COUNT(*) FROM table" look at an index, which apparently it doesn't(?)

  • RE: Twenty tips to write a good stored procedure

    jacroberts (8/25/2009)



    11. More WHERE clause hints - Avoid unnecessary conditions in the WHERE Clause. Also try to avoid a function in the WHERE clause as it presents SQL engine to...

  • RE: Twenty tips to write a good stored procedure

    Lynn Pettis (8/24/2009)


    I understand that what you wrote was an illistration of how IN works. My point is if you actually write a WHERE clause like that, you would...

  • RE: cast, convert and float!

    Jim in Arizona (8/20/2009)


    A floating point integer? I think you might need a stronger drink, Jim... [Tongue]

    Yea, it's not my day, let me tell ya. It sounded good though....

  • RE: Twenty tips to write a good stored procedure

    Andy DBA (8/18/2009)

    For example:

    WHERE somecol NOT IN (1,2, NULL)

    is equivalent to

    WHERE NOT (somecol = 1 OR somecol = 2 OR somecol = NULL)

    Wait, isn't that backwards? IN...

  • RE: cast, convert and float!

    Re SET and SELECT, is there a realistic scenario OTHER than capturing previous statement's @@ERROR and @@ROWCOUNT where a single statement must be used? I think it's the only...

  • RE: Storing IPv4 Addresses for Performance

    I repeatedly forgot that the point of the article was performance - assume that processing of IPv4 address data is critical, how do you best store it?

    Processing is likely to...

  • RE: cast, convert and float!

    Mark Horninger (8/20/2009)


    Probably should use SET vs. SELECT. Think I saw that as being deprecated, but I might be wrong?

    I was on that in another discussion. It doesn't...

  • RE: Storing IPv4 Addresses for Performance

    How about if you do a two-stage conversion - from octets to binary(4), and then CAST to int? Does that hold the same 4 bytes internally? Does that...

  • RE: Storing IPv4 Addresses for Performance

    lhowe (8/19/2009)


    Darn it HansVE, you beat me to the punch! I was going to say exactly the same thing. I don't see why someone would go to all...

  • RE: char to datetime!

    Cliff Jones (8/19/2009)


    If you rely on implicit conversion, is it going to convert the CHAR to DATETIME or DATETIME to CHAR? You are never really sure so you...

  • RE: char to datetime!

    Is there a way to specify a constant date/time that isn't

    " SET @date = '2009-08-19' " ?

    (Or "CONVERT" from the date encoding of your choice, I suppose.

    Or "SET...

  • RE: CheckDB

    Well, since you want a live application database to have no CHECKDB faults, and the recommended way to remove faults is to restore... Of course you can rename the...

  • RE: CheckDB

    Paul Randal (8/18/2009)


    rja.carnegie (8/18/2009)


    CHECKDB comes with the rather discouraging advice that you should address any errors by dropping the database and restoring from a good backup

    No it doesn't - can...

Viewing 15 posts - 31 through 45 (of 73 total)