Forum Replies Created

Viewing 15 posts - 5,716 through 5,730 (of 6,036 total)

  • RE: User Defined Functions Investigation

    Switch off all SQL statistics and run Performance Monitor from Windows "Administrative Tools"

    And then try to catch your 15 times difference in CPU load.

  • RE: User Defined Functions Investigation

    Do you actually believe that???

    Average CPU!1.347!1.904!31.265!0.56!29.92

    Analysis:

    The use of a UDF instead of in-line SQL resulted in a 21 % increase in duration and a 15 fold increase in CPU...

  • RE: fine Tuning?

    IF EXISTS (SELECT * FROM sysobjects WHERE name = N'RefineString')

     DROP FUNCTION RefineString

    GO

    CREATE FUNCTION dbo.RefineString

     (@String nvarchar (4000))

    RETURNS nvarchar

    AS

    BEGIN

     SELECT @String = REPLACE(@String, ' LTD.', ' limited')

     SELECT @String = REPLACE(@String, ' LTD',...

  • RE: Timeout Expired - Autogrow of file cancelled or timed out

    They told you "to set a smaller FILEGROWTH "

    And what did you do?

    Check the disk where you .ldf file placed. Probably there...

  • RE: User Defined Functions Investigation

    Copy - Paste.

    Nothing special. Only reduces number of rows to 500k or 200k depending on capability of server I used.

    You can see it in results. I did not post 500k...

  • RE: Access inserted, deleted virtual table in the SP

    REALLY bad.

  • RE: Self-Referencing Parent Child Table SELECT Statement Possible?

    Hopefully your "OrgChart" table is not being updated dozen times per minute.

    So the best way to improve performance is to create separate table ReportsToBoss(BossId, ReporterId) and fill it up with...

  • RE: Self-Referencing Parent Child Table SELECT Statement Possible?

    CREATE ....

    Declare @IDS TABLE (Id int)

    INSERT INTO @IDS (ID)

    SELECT @ID

    WHILE EXISTS (select 1 from tblEmployee E

                            inner join @IDS I on E.ParentId = I.Id --E.ParentId in @IDS

                            left join @IDS I1 on...

  • RE: Need help with inner join

    No, it is NOT a relational database.

    Your calldata field contains at least 5 fields:

    name;address;city;state;Zipcode;Phone.

    So it must be separate table "CallData", one column for name, one for address, etc.

    And it...

  • RE: Need help with inner join

    What you have is not relational database actually.

    This forum is not about working with "flat file" kind of data.

    Change your table to relational type - one entity=one table, one value...

  • RE: User Defined Functions Investigation

    Another option.

    I replace real values with NULLs.

    ---------------

    DECLARE @MyStart DATETIME

    DECLARE @MyEnd   DATETIME

    Declare @DummyDate datetime

      PRINT 'Formula in SELECT, returns NULLS'

        SET @MyStart = GETDATE()

     SELECT CONVERT(DATETIME, CONVERT(INT, Date2 - 0.5)) + @DummyDate...

  • RE: User Defined Functions Investigation

     There are some options (as always)

    I tried to minimise network traffic influence. Feel the difference:

     PRINT 'Formula in WHERE'

        SET @MyStart = GETDATE()

     SELECT *

       FROM...

  • RE: how to substract from getdate()

    = getdate() - 1

  • RE: Current week, last week, current month and last month

    DateVal - ((DATEPART(dw, DateVal) + @@DATEFIRST + 5) %7)

    gives you last monday before DateVal. If DateVal is Monday it will return DateVal.

  • RE: fine Tuning?

    2 hickymanz

    Have you heard something about UDF?

    All those terrible REPLACE and SUBSTRING = SUBSTRING must be encapsulated in 2 scalar UDF.

    Within UDF...

Viewing 15 posts - 5,716 through 5,730 (of 6,036 total)