Forum Replies Created

Viewing 15 posts - 4,561 through 4,575 (of 7,610 total)

  • RE: Using count(*) performance

    If you have indexes keyed on tbl2.col1 and on tbl3.col1, then it almost has to be some type of blocking. You could try the query below, might work better,...

  • RE: Using count(*) performance

    Do you have a nonclustered, nonfiltered index containing tbl2.col1?

    A nonclustered, nonfiltered index containing tbl3.col1?

  • RE: Best Practice - how to exclude records?

    If you need to know if all the lines have only product_type = 'A' on any kind of regular basis, I'd denormalize and add a flag to the invoice header,...

  • RE: How to select 200k data faster in sql

    Jeff Moden (12/12/2015)


    ScottPletcher (12/10/2015)


    Do you have a unique index on Word? You don't want SQL to have to sort the words every time -- that will be extremely slow....

  • RE: what is the best way to rewite a oracle sql query to sql server 2012

    Here's a few notes on the conversion process, and a sample of the first table converted.

    The double quotes are fine, as long as "SET QUOTED_IDENTIFIER ON" is active, which it...

  • RE: TempDB Log growing

    Is the log size growing, or just the % used? You don't want the log size to grow dynamically, as that will slow down the database. But tempdb...

  • RE: How to catch actual parameter value passed into a stored procedure?

    If it's for a single, specific stored proc, could you just add code to that proc to save the parameter values that came in? You could even have an...

  • RE: How to select 200k data faster in sql

    Do you have a unique index on Word? You don't want SQL to have to sort the words every time -- that will be extremely slow. Also, if...

  • RE: indexing Datetime column

    The clustered index is definitely correct. Date will be mildly more efficient than datetime, but it's not enough of a difference to be a big deal.

    Make sure the fillfactor...

  • RE: SELECT 1 random row query help, please

    kiril.lazarov.77 (12/10/2015)


    ScottPletcher (12/9/2015)


    Create a separate index of just the IDs. Then select a random ID using ORDER BY NEWID(), then use that ID to get the rest of the...

  • RE: SELECT 1 random row query help, please

    kiril.lazarov.77 (12/10/2015)


    ScottPletcher (12/9/2015)


    Create a separate index of just the IDs. Then select a random ID using ORDER BY NEWID(), then use that ID to get the rest of the...

  • RE: how extract values from expressions

    If it's always a "w" followed by a digit or digits, perhaps just this?!:

    declare @testdata table(expression varchar(500))

    insert into @testdata values('[w1+w2+w3/5]'),('[(w1+w2+w3)/5]'),('[(w4-w5*w6)/5]')

    insert into @testdata values('w1')

    insert into @testdata values('2w3')

    insert into @testdata values('4+w5')

    select 'w'...

  • RE: How to update rows faster

    Cluster the table on the month.

    I'd include at least the year with the month. Best is to use a column of type date, but if necessary you can use...

  • RE: working with Case inside a IF EXISTS

    No, the syntax is somewhat off. A CASE expression must evaluate to a single value.

    For what you're doing, try something like this instead:

    IF @Client = 'Winco Foods' AND EXISTS(

    SELECT...

  • RE: Dynamic filtering of concatenated fields

    Also, for best performance, specify the least likely to match condition first. If one (or more) of the AND conditions are going to be false, you want SQL to...

Viewing 15 posts - 4,561 through 4,575 (of 7,610 total)