Forum Replies Created

Viewing 15 posts - 541 through 555 (of 2,458 total)

  • RE: Question on Extended event

    vsamantha35 (8/11/2016)


    Thanks Alan.

    I have one more question, how to handle / avoid query timeouts?

    What Gail said really sums it up. 😉

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Questions on spills to tempdb

    Brandie Tarvin (8/11/2016)


    Recently I noticed some of my code has the warning "Operator used tempdb to spill data during execution with spill level 1." I have a few questions on...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: DateTo parameter not returning correct data

    To alleviate the SARGability problem with the "WHERE CAST(RequiredByDate AS DATE) BETWEEN @StartDate AND @EndDate" solution Drew and I provided you could create an indexed view like so:

    CREATE VIEW dbo.vw_TempDate

    WITH...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: DateTo parameter not returning correct data

    Consider this query:

    DECLARE @StartDate DATETIME;

    DECLARE @EndDate DATETIME;

    SET @StartDate = '20160801'

    SET @EndDate = '20160805'

    SELECT startdate = @StartDate, enddate = @EndDate;

    Results:

    startdate ...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Strange update behaviour

    cmullen77 29296 (8/10/2016)


    Hey Alan,

    That was my point.. I had an issue running an update statement, so I started eliminating rows to figure out what was causing my problem. ...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Question on Extended event

    http://www.scarydba.com/2015/03/12/monitoring-timeouts/%5B/url%5D

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Strange update behaviour

    cmullen77 29296 (8/10/2016)


    Okay, I MUST be missing something;

    update EmpActions set isactive = 'N' where 1=2

    When I run this, my MS SQL server goes to about 33% and just...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: help with effective dating logic

    is250sp (8/10/2016)


    I have a table with the following records.....

    emplid effdt effseqjobcode

    00001068 3/27/200500241

    00001068 ...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Using Charindex

    sam 55243 (8/10/2016)


    Hi All,

    I'm using stored procedure where i'm getting role Id in comma separated values and i need to check for specific role id in that. Im using charindex...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: How do you manage your junior DBA

    S7 (8/10/2016)


    Do you give him/her a daily tasks to todo? How do you manage them? please help.

    Depends on what kind of DBA (operations, application, all of the above), how junior...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Count the occurrence of word in a Resume Table

    shambhavi13 (8/10/2016)


    I am pretty satisfied with the NGrams8k solutions you gave . The results are accurate and since I only have to deal with one candidate at a time the...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Count the occurrence of word in a Resume Table

    shambhavi13 (8/9/2016)


    Yeah no doubt the below solution you gave is the fastest of all .. but after testing it on few resumes it doesn't seem to give exact count ..

    SELECT...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Full-Text Indexing & Searches

    Alternatively you could parse those strings into individual words and create a search table that would avoid the scan problem, but that is probably a lot more work than just...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Count the occurrence of word in a Resume Table

    .. I want to display the candidate rank as an avg of all the three columns .

    Using my sample data from earlier, the best way would be like so:

    SELECT...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Count the occurrence of word in a Resume Table

    J Livingston SQL (8/4/2016)


    ALan....consider the following please

    DECLARE @tblResumeTag TABLE ( int identity primary key, TextVersion varchar(8000));

    INSERT @tblResumeTag(TextVersion) VALUES

    ('I accelerated the development of the system by making rationale decisions based on...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 541 through 555 (of 2,458 total)