Forum Replies Created

Viewing 15 posts - 181 through 195 (of 10,144 total)

  • RE: Fragmentation

    ramyours2003 - Wednesday, December 5, 2018 9:36 PM

    Is fragmentation is there on a table where it does not have any index if...

  • RE: Pass Table Name by joining Constant String and A Field Value from Same Row

    sam.cool.just4u - Friday, November 30, 2018 4:19 AM

    Thanks for the response. Sorry this won't work in my scenario.
    As the Number of Columns...

  • RE: Need a suggestion for my SQL requirement

    IF OBJECT_ID('tempdb..#dbo_Employees') IS NOT NULL DROP TABLE #dbo_Employees;
    SELECT * INTO #dbo_Employees FROM (VALUES
     (1,CAST('FN1' AS VARCHAR(10)), CAST('MN1' AS VARCHAR(10)), CAST('LN1' AS VARCHAR(10)), CAST('D1' AS VARCHAR(10)), CAST('2018-01-01' AS DATE)),
  • RE: Slow SQL Script

    AhTu_SQL2k+ - Thursday, November 29, 2018 10:25 PM

    Hi ChrisM,
    Timeout issue has been resolved. Below steps are the changes highlighted by your previous...

  • RE: poor performing report query against table without a PK

    Just this, please:

    DECLARE @BULKID varchar(50) = 5006

    SELECT
    [Offer_ID],
    [Offer_Generate_Date],
    [Serial_Number],
    [BAN],
    [BulkID]
    INTO #AssurantManufacturerReceived
    FROM DistributionCenterFeed.[dbo].[QR_Device_Trade_In_Master_2016onward]
    WHERE QR.BulkID = @BULKID
  • RE: poor performing report query against table without a PK

    ChrisM@Work - Thursday, November 29, 2018 3:01 AM

    That plan has some strange features, e.g. estimated row count for BrandID of over a...

  • RE: poor performing report query against table without a PK

    polkadot - Thursday, November 29, 2018 9:19 AM

    @frederico_fonseca - I will send the query and execution plan in private email...

  • RE: sql performance question

    Thom A - Thursday, November 29, 2018 2:21 AM

    Maybe the DISTINCT, which just gets more expensive the more rows and columns you...

  • RE: poor performing report query against table without a PK

    That plan has some strange features, e.g. estimated row count for BrandID of over a million for just 9 rows, and parallelism...

    Can you try this please, and post...

  • RE: poor performing report query against table without a PK

    @polkadot, there is an error in your code:

    FROM [#Assurant Manufacturer Received] QR
    WHERE QR.[Offer_Generate_Date] BETWEEN @FROM_DATE AND @TO_DATE

    should be

    FROM DistributionCenterFeed.[dbo].[QR_Device_Trade_In_Master_2016onward] QR
    WHERE...

  • RE: Slow SQL Script

    AhTu_SQL2k+ - Wednesday, November 28, 2018 8:29 AM

    ChrisM@Work - Wednesday, November 28, 2018 7:03 AM

  • RE: poor performing report query against table without a PK

    This could offer a perf lift:


    SELECT QR.[Offer_ID]
      ,QR.[Offer_Generate_Date]
      ,QR.[Offer_Update_Date]
      ,QR.[Manufacturer]
      ,QR.[Model]
      ,QR.[Serial_Number]
      ,QR.[Application_User_ID]...

  • RE: Slow SQL Script

    Also:

    Add [qty] to index [s_dopicklot].[NonClusteredIndex-20181127-173726]

    Add [qty_pick] and [qty_send] to index [s_dodetl].[_dta_index_s_dodetl_18_591549391__K1_K2_K23_K13_K6]

    This could remove the two key lookups from the plan.

  • RE: Slow SQL Script

    Data type mismatches, where join columns between two tables are of two different types, are causing you some grief:

    CONVERT_IMPLICIT(nchar(30),
     [TotalERP_winwin].[dbo].[s_dodetl].[part_code] as .[part_code]
     ,0) =
     [TotalERP_winwin].[dbo].[s_locqty].[part_code] as [l].[part_code]

  • RE: Slow SQL Script

    AhTu_SQL2k+ - Wednesday, November 28, 2018 6:43 AM

    Hi ChrisM,

    My colleague helped me to try out your restructured script however, the speed is...

Viewing 15 posts - 181 through 195 (of 10,144 total)