Forum Replies Created

Viewing 15 posts - 6,046 through 6,060 (of 7,619 total)

  • RE: Need to Create Partition to an existing Table

    It sounds as if the original table wasn't clustered. That alone can cause big performance issues.

    You should put the appropriate clustered index on the table before doing the partitioning....

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Need Help to remove first word

    What, specifically, are you trying to do?

    If you want to remove up to the first space from the front of the string, you can do this:

    SELECT SUBSTRING(address, CHARINDEX(' ', address)...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Performance question after adding an index

    I'm not sure raw query counts can be used to determine an index's viability.

    I too have seen statements to the effect that indexes with more writes than reads should be...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Splitting ldf and mdf onto seperate disk LUNS

    OK, sorry. I guess I interpreted "any other benefits" too broadly.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Comparing performance of two versions of a query

    Just curious. Since your table has at least 100M rows, did you review the indexes, particularly the clustered indexes?

    That usually makes vastly most difference than how the...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: DB concurrency how to....

    Yeah, no gaps will be a royal pain to implement.

    If you can allow "voided" gaps, then I think a standard identity would handle this, don't see the need for using...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Returning results that fall within the current financial year

    WHERE

    [Entered Date] >= DATEADD(MONTH, 6, DATEADD(YEAR, DATEDIFF(YEAR, 0, GETDATE())

    - CASE WHEN MONTH(GETDATE()) < 7 THEN 1 ELSE 0...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Convert value to seconds

    select times, LEFT(times, len(times) - 3) * 60 + RIGHT(times, 2) as seconds

    from @time

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Huge TempDb file on a Development server

    The restores themselves per se wouldn't cause big tempdb growth.

    However, I think it's possible that some settings in those dbs might (for example, snapshot settings).

    As noted by all,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Splitting ldf and mdf onto seperate disk LUNS

    You can use different RAID levels for data vs logs. Data often does best with RAID5, whereas logs often do best with RAID10.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Error converting data type varchar to datetime.

    sirishgreen (6/3/2014)


    I thought I had cracked this issue but now....

    and DE_Date between

    '20140906' and '20140906'

    This is being read as The 9th of June by SQL server.

    After I looked...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: t-sql 2008 exlain select

    To return a single "OR'd" row, I think you can just add MAX()es to the "standard" & conditions:

    SELECT

    STUFF(

    MAX(CASE...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: t-sql 2008 exlain select

    I think the overhead of XML is unwarranted here, if I understand the desired output correctly. needed[/i].]

    But,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Convert string to date then use in where clause

    Not 100% sure what output you want: the warranty date in a separate column based on its status or a status column itself, like below.

    SELECT

    machNameTab.machName

    ,warranty

    ,CASE WHEN warranty...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: performance problems stored procedures vs dynamic sql

    If you're saying all the tables already have the correct clustered indexes, as I noted in my previous post, I don't agree with that for at least:

    dbo.DCSubRegionTran

    This isn't something where...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 6,046 through 6,060 (of 7,619 total)