Forum Replies Created

Viewing 15 posts - 1,306 through 1,320 (of 2,462 total)

  • RE: Query taking time

    PJ_SQL (7/29/2015)


    Hi,

    I have this script, it is taking long time to execute, what can I do to make it execute faster?

    DECLARE @c varchar(10)

    SET @c = '%A1%'

    select *

    from...

    "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: Looking for information on SSRS Reports

    Duplicate post - please direct all answers here.

    "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: Looking for information on SSRS Reports

    If the reports are being developed using visual studio I would keep a copy of the solution/project and, yes, it would be a good idea to backup the reportserverdb. I...

    "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: The Evolving DBA

    There is also the fundamental way in which larger "cloud" type providers (inside your organization or third parties) can include features or services that reduce the need for DBAs.

    I expect...

    "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: Query Execution plan too long

    thenewbee (7/23/2015)


    Sorry that I couldn't post my plan here. I agree to Luis C. and decided to go step by step.

    I wanted some experts commenting how to analyze a very...

    "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 to delete tables in a database whose table names match a criterea

    Yeah, that won't work...

    This is something you can accomplish using Dynamic SQL.

    "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: two indexes on same column

    For the life of me I can't think of a scenario why you would not want just a clustered unique index and drop index #2, anyone think of any scenario...

    "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: Query Execution plan too long

    I bet if you post the plan here that we can take a look at it and get an idea of what is killing your performance.

    "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: array variables in sql server?

    Alvin Ramard (7/22/2015)


    I vote for either temp table or table variable.

    Yep.

    "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: array variables in sql server?

    Out of curiosity, has SS array support improved in any way since 2008?

    Yep, in 2012 they included CHOOSE.

    I never see it used though....

    Hmmmm, now I'm curious to how it...

    "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: Conver Number to string ( exp. 9 - 0009 or 9 - 09)

    mak101 (7/2/2015)


    How about

    RIGHT(REPLICATE('0',@size) + CAST(@value as varchar(max)),@size)

    I was thinking the same thing (maybe not varchar(max) though ;-))

    "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: SQL Performance Issue

    Some DDL for the tables and underlying objects involved would be helpful. Note the link in my subject line.

    Also, could you include the query plan that this query generates?...

    "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: EXECUTE SP from Select sp_name from table

    There's nothing attached. Keeping in mind I don't know how values are being assigned to what your stored procs are ingesting you could do something like this:

    -- sample table using...

    "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: Necessary tools, helpful sites

    You are on the right track. SSDT is the new BIDS. Notepad++ is still essential ;-).

    My personal opinion is to learn/freshen up on XML; knowing XML has been extremely...

    "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: Why don't these two queries return the same number of records?

    Unless I'm missing something there's no reason to believe that that the two queries that you posted should return the same number of records.

    I wanted to know if maybe we...

    "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 - 1,306 through 1,320 (of 2,462 total)