Forum Replies Created

Viewing 15 posts - 4,441 through 4,455 (of 10,144 total)

  • RE: Problem with Co-Related Subquery

    T.Ashish (6/30/2013)


    I tried one more thing in above suggestions, as pasted below.

    It is not asking for missing indexes and performing much better.

    ...

  • RE: Return numbers in a range

    Bala' (6/30/2013)


    Thanks for this update Jeff. Yeah I got exactly what you have expressed.

    I have an question ,is there any alternative way to get all child in self referencing...

  • RE: Logic for a complex query which involves grouping and average in SQL

    SQLServeruser2304 (6/28/2013)


    Thanks Chris, Just one thing, I havent mentioned but I thought I could query it myself. Below are the points :

    1. I have 2 input parameters i.e., FromDate...

  • RE: Please Help me in the query

    An index on column msisdn of table vmd_blulm would help, though probably not as much as the plan suggests. I'd do this first because it's likely skewing the relative costs.

    The...

  • RE: Updating huge table

    -- Gather all of the update info into a skinny temp table

    -- then you're done with VoiceData_History.

    -- Add a column containing a suitable batch number

    -- used to split your data...

  • RE: Return numbers in a range

    Bala' (6/28/2013)


    WITH RECURSIVE CTE

    CREATE TABLE #TestTable ([Index] int,[StartNumber] int,[Endnumber] int)

    INSERT INTO #TestTable

    SELECT 1,1000,1002 UNION ALL

    SELECT 2,1550,1555

    ;WITH TableCte

    AS

    (

    SELECT [Index],[StartNumber] ,[Endnumber] FROM #TestTable

    UNION ALL

    SELECT [Index],[StartNumber]+1 ,[Endnumber] FROM...

  • RE: Logic for a complex query which involves grouping and average in SQL

    There's plenty of scope for improvement - mostly maintainability, but performance too. Compare the original with this (without sample data to test against, it's untested), which is about halfway to...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (6/27/2013)


    Cleared IRDO and will be heading to Afghanistan tomorrow via Kuwait.

    It is actually happening! I am getting much more anxious!

    I will probably be dark for about a...

  • RE: INSERT Statement

    Or NOT EXISTS. Both compare columns individually rather than concatenating them together which can give rise to false matches.

    WHERE NOT EXISTS (

    SELECT 1 FROM DSD

    WHERE DSD.modify_by = smf6.RespID AND...

  • RE: What's the best index?

    Easily tested:

    /*

    Use a tally table as a row source

    DROP TABLE #MyTable

    SELECT

    col1 = ABS(CHECKSUM(newid()))%32,

    col2 = (10000-n)%32,

    col3 = n,

    col4 = newid()

    INTO #MyTable

    FROM InlineTally (1000000)

    */

    SET STATISTICS IO ON

    DBCC DROPCLEANBUFFERS

    --...

  • RE: Query improvement

    Why read the table twice?

    SELECT

    sumyy = sum(yy),

    xx = ???('summary line') -- where ??? is an aggregate function

    FROM tablea

    CROSS APPLY (

    SELECT SurrogateGroup = CASE

    WHEN somedate_column < @startdate_parameter THEN...

  • RE: Problem with Co-Related Subquery

    Post the actual execution plan as a .sqlplan attachment.

  • RE: Stored Procedure Performance

    amardesai89 (6/27/2013)


    I have one Stored procedure That takes around 2 hour to execute.

    it runs in 2 hours on server with 8 processors.

    and it runs in same time on server with...

  • RE: Are the posted questions getting worse?

    GilaMonster (6/27/2013)


    Apologies if any arrogance is showing through this morning.

    Can't see any arrogance showing through from here, commendable considering the unruliness of the kids in your classroom today.

  • RE: general

    paul.knibbs (6/27/2013)


    Is the "Compute Scalar" part the bit that is ISNULL?

    Right-click on the Compute Scalar operator to raise the properties sheet.

Viewing 15 posts - 4,441 through 4,455 (of 10,144 total)