Forum Replies Created

Viewing 15 posts - 1,066 through 1,080 (of 6,036 total)

  • RE: Query to find all procedures that uses functions in the where clause(left operand)

    KBSK (11/2/2016)


    Grant Fritchey (11/2/2016)


    Just curious, what about the right hand side? You can write a query that puts a function against a column on either side of the operand and...

  • RE: Remove decimal from varchar field

    J Livingston SQL (11/3/2016)


    maria.lindquist (11/2/2016)


    The current value is of varchar(7) type.

    ok, without you answering the rest of my question for expected results on various scenarios...here is shot in the dark...

  • RE: Big data: transfer x-number of rows per batch?

    The fastest data transferring channel is a truck loaded with DVD's

    :hehe:

  • RE: Why would table identity value be incorrect?

    P a u l (11/2/2016)


    How can sql server identity values be fouled up like this?

    Like this:

    DBCC CHECKIDENT ( 'table1', RESEED, 1453158)

  • RE: Sql query help

    KGJ-Dev (11/2/2016)


    Hi,

    is there any way to avoid the pivoting here.

    It depends.

    What is it for?

    What is 2nd table is made for?

  • RE: Sql query help

    Can you explain the order of values in this query?

    select 1,100,200 union all

    select 2,200,null union all

    select 3,120, 20

    Why 100 goes before 200 for ID=1,

    and 120...

  • RE: Huge tempdb log file

    webrunner (11/1/2016)


    But is there any way to capture such a query as its tempdb log space usage crosses certain thresholds (such as 50% of the available tempdb log space) -...

  • RE: Stop query if it is taking too long

    Eirikur Eiriksson (10/29/2016)


    Jeff Moden (10/24/2016)


    Eirikur Eiriksson (10/24/2016)


    you will need this index on the dbo.Transaction

    CREATE UNIQUE NONCLUSTERED INDEX [INDEX_NAME] ON [dbo].[Transaction]

    (

    [InvoiceUID] ASC,

    [IsSuccess] ASC,

    [TransKind] ASC,

    [TransactionDate] ASC

    )

    INCLUDE ( [CardNumber],[ReferenceNumber],[SeqCounter],[UnqReferenceNumber]);

    I came up with...

  • RE: Stop query if it is taking too long

    mah_j (10/29/2016)


    you will need this index on the dbo.Transaction

    CREATE UNIQUE NONCLUSTERED INDEX [INDEX_NAME] ON [dbo].[Transaction]

    (

    [InvoiceUID] ASC,

    [IsSuccess] ASC,

    [TransKind] ASC,

    [TransactionDate] ASC

    )

    INCLUDE ( [CardNumber],[ReferenceNumber],[SeqCounter],[UnqReferenceNumber]);

    and this index for the dbo.Invoice

    CREATE UNIQUE NONCLUSTERED INDEX...

  • RE: Huge tempdb log file

    Check for open transactions.

  • RE: Code first vs rightsizing nvarchar(n)/nvarcar(max)

    yakko_Warner (10/27/2016)


    Did you use len() or datalength() to find the length of the strings.

    Both.

    For verification.

    It did not matter at the end.

    They trimmed all strings in .Net code before storing...

  • RE: Code first vs rightsizing nvarchar(n)/nvarcar(max)

    yakko_Warner (10/27/2016)


    How large are we talking? TerraBytes or larger?

    Also can you quantify the 7x faster?

    Thanks!

    I was not a DBA there, so did not look into DB sized.

    Performance wise -...

  • RE: Can I do this?

    Sterling Ostin (10/26/2016)


    Sergiy,

    I did read Luis' post and incorporated it in an even more graceful and shorter solution that best suited my need.

    In the future, maybe you ought to question...

  • RE: Can I do this?

    Jeff Moden (10/26/2016)


    Heh... careful now. You don't have the time for this. Gotta trust me on this one. 🙂

    Jeff, don't you think it's a bit too late to...

  • RE: Performance Issue

    Writing queries like this is asking for trouble.

    Must be created by some automation tool and is extremely difficult for optimizer.

    It might be not the index you found, people normally do...

Viewing 15 posts - 1,066 through 1,080 (of 6,036 total)