Forum Replies Created

Viewing 15 posts - 4,621 through 4,635 (of 7,610 total)

  • RE: Partitioned Aligned Indexes & Primary Key

    You could also archive first and modify the indexes later.

  • RE: Partitioned Aligned Indexes & Primary Key

    The main thing is to make sure the tables are properly clustered. Often that will give you good performance from the table even without archiving (or partitioning).

    Partitioning is sometimes...

  • RE: Tune SQL Query with very large tables

    --!!NOTE: showing missing indexes can take some time; set @list_missing_indexes = 0 below if you don't want to wait!!

    --USE [your_db_name]

    SET DEADLOCK_PRIORITY -8 --make sure we are the victim if we...

  • RE: Tune SQL Query with very large tables

    Would need to see the view definition and related table definitions.

    If you're serious about tuning the tables, rather than just this specific query, would also need to see...

  • RE: What happens with uncommitted transactions?

    First, let's clear this up:

    Is it only the user account of the one who made the [transaction], who gets [blocked]?

    Absolutely not. SQL doesn't care at all about who did...

  • RE: Query Performance Problem

    Sergiy (11/19/2015)


    ScottPletcher (11/19/2015)


    I'm certain they're never running an EXISTS check because they are not reusing codes,

    Have a look at the topic starter:

    SET @RedemptionCode = dbo.GenerateRandomBase32(@RedemptionSeed)

    WHILE((@RedemptionCode IS NULL) OR EXISTS(SELECT RedemptionCode...

  • RE: Query Performance Problem

    Sergiy (11/19/2015)


    ScottPletcher (11/19/2015)


    When one campaign is over all the relevant promo codes are made inactive.

    Yes, by deleting them from the current promo table, not by just flagging them. They...

  • RE: Unique index on varchar(max) column

    To have the index automatically built, you can add a persisted, computed column, like this:

    CREATE TABLE search_T

    (

    num INT,

    value VARCHAR(max),

    value_for_indexing as cast(left(value,896) as varchar(896)) persisted

    ,UNIQUE CLUSTERED (num,value_for_indexing)

    )

  • RE: Query Performance Problem

    Sergiy (11/19/2015)


    ScottPletcher (11/19/2015)


    Try to follow this, it's simple enough even for you.

    When it's used up initially, it's removed forever from the current table, since it has no current value.

    No person...

  • RE: Query Performance Problem

    Sergiy (11/19/2015)


    ScottPletcher (11/19/2015)


    Sergiy (11/19/2015)

    ScottPletcher (11/18/2015)


    Once they've been used up, you'd remove them so they can't be reused.

    How exactly you intend to prevent used codes from being reused (regenerated as new)...

  • RE: Query Performance Problem

    Sergiy (11/19/2015)

    ScottPletcher (11/18/2015)


    Once they've been used up, you'd remove them so they can't be reused.

    How exactly you intend to prevent used codes from being reused (regenerated as new) if they...

  • RE: Query Performance Problem

    Sergiy (11/18/2015)


    ScottPletcher (11/18/2015)


    Once they've been used up, you'd remove them so they can't be reused.

    How exactly you intend to prevent used codes from being reused (regenerated as new) if they...

  • RE: Query Performance Problem

    Sergiy (11/18/2015)


    ScottPletcher (11/18/2015)


    Lol. So you think Amazon.com has every gift code number they've ever issued in their current gift codes table? Unbelievable.

    Why not?

    May be not "ever issued", may...

  • RE: Query Performance Problem

    Sergiy (11/18/2015)


    ScottPletcher (11/18/2015)


    Of course. But that doesn't mean I have to store decades worth of obsolete numbers in my main table, now does it? If the number is...

  • RE: Query Performance Problem

    Sergiy (11/18/2015)


    ScottPletcher (11/18/2015)


    First, how do you know that inactive codes are routinely searched? That's almost never the case.

    Mobile top up numbers. Gift cards. iTunes cards. Game access codes. Software...

Viewing 15 posts - 4,621 through 4,635 (of 7,610 total)