Forum Replies Created

Viewing 15 posts - 7,396 through 7,410 (of 7,619 total)

  • RE: Indexing... Considerations for high (but predictable) INS/DEL activity.

    Then why even have the constraint at all then. If all inserts/updates and deletes are done under controlled access methods (ie SPs) and ad-hoc access to the database is not...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Indexing... Considerations for high (but predictable) INS/DEL activity.

    Might not be a good idea if inserts are expected while also doing the deletes.

    Perhaps, if you really normally do INSERTs that would violate the constraint. Hopefully that's extremely...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Indexing... Considerations for high (but predictable) INS/DEL activity.

    I think the point sturner was making was that your order of deletion would violate the foreign key constraint.

    That's a good point; yes, I wasn't sure if indeed such a...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Indexing... Considerations for high (but predictable) INS/DEL activity.

    Should I be looking at tuning the fill factor in this situation? Higher or lower than "stock"?

    Yes, it can be very applicable to non-clus indexes.

    You would lower the fillfactor,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Indexing... Considerations for high (but predictable) INS/DEL activity.

    That wouldn't work if there were FK from the license_message_value table id --> license_message table.

    I reversed the order of the table deletes for performance. By doing the controlling (in...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Indexing... Considerations for high (but predictable) INS/DEL activity.

    If I understand correctly, the license_message table has a:

    clus index (/PK) on license_message_id

    nonclus index on archive_date

    <other nonclus...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need to have a query which could get me the details sizes for all the tables in a prticular database

    Here's my version (everybody's got their own version :-)). It provides MB totals for each table, each table and all its indexes, total number of indexes per table and...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: long running sp

    Please try my last posted version.

    It includes a check to avoid updating those rows that already have the value that would be assigned.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Creating a procedure to dynamically build an update statement

    @scott: By best practice you never store your unencryption mechanisms and your data in the same place. Admittedly, there are times when you may need to work with the data...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Creating a procedure to dynamically build an update statement

    I suggest looking into SQL's existing EncryptByKey and DecryptByKey functions.

    I disagree with the idea that encryption/decryption can be left to the app. Because you may want to work with...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: long running sp

    Maybe I'm not getting this, but tableB does not get updated.

    No, but tableB provides a lookup table to get the value with which to update the other table. ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: What is the perfect Index , in this special case

    My best (educated) guess based on what you've posted so far is:

    A filtered index on ISAPPLIEDFORSPECIFICDAYS = 1, including the daily columns.

    That index may or may not help -- you'd...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: long running sp

    CREATE NONCLUSTERED INDEX [IDX_ApplAcctNo] ON [dbo].[tableB]

    (

    [applAcctNo] ASC

    )

    Since tableB already has that index, I suggest changing its definition to also contain the acct_nbr and the bit flag. Then...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Total / average function advice

    So much for a UNIQUE Clustered Index and the performance that will offer.

    The way around this problem is to determine what makes each row UNIQUE in your table while considering...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Shrinking Databases

    The DBCC SHRINKDATABASE() will shrink the log file also, so you don't need to do it separately; thus, you can just comment out the "DBCC SHRINKFILE".

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 7,396 through 7,410 (of 7,619 total)