Different Methods of JOINing to table with 6.4 Million Records

  • I haven't had much more time to work on it late last week, but what I have right now is the same as a couple posts prior, with the exception of additional indexes on each of the statistics tables, as mentioned above (CompanyID, Date INCLUDE IPAddr), and the IP conversion using the PARSENAME method as opposed to the old UDF method. All tests have shown using the temp table improves the execution time, despite a Table Scan. Furthermore, removing the constraint name allows SQL Reporting Services to run more than one report simultaneously. CPU usage is less than 50%.

    [font="Tahoma"]Zycon - The Search Engine for Manufacturers[/url]. Helping Engineers and Technical Buyers Locate Aluminum Extrusions, Metal Stampers, Plastic Fabricators, Valves, and More.[/font]

  • Sounds like you've probably got "good enough" in that case.

    If you want us to, we can take a look at the execution plan and see if there's anything that might benefit from further tweaking, but on the data volume you're working with, the amount of time it's taking doesn't sound too bad.

    And, yeah, temp tables do work nicely for that kind of thing. There are times when it's better to incorporate it as a derived table/CTE, and there are times when it's better to use a temp table.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

Viewing 2 posts - 31 through 31 (of 31 total)

You must be logged in to reply to this topic. Login to reply