WHERE filter is killing my query against a SQL Server 2005 database

  • Just does to show that you can't use Crystal's database expert to browse and join files and expect it to work well. Always do the work on the sql server end via a view or sp.

  • Brian Fischer (1/5/2010)


    Just does to show that you can use Crystal's database expert to browse and join files and expect it to work well. Always do the work on the sql server end via a view or sp.

    I second that.

    "Keep Trying"

  • Just to give an update:

    I got the query to run in under 15 seconds by simple removing a table that wasn't needed. For those of you that have seen my attachments, that was the ei_tc_doc_head table. It was linked from the first table by emp_code and it linked to a third table by emp_code also. I cut it out and linked from the first table to the third table. It was a middle man. Nothing in the query was referencing any columns of this table. Nothing in Crystal referenced it either. Cutting that table out cut my 1-2 hour query down to about 12 seconds. Now I have two more queries/reports to fix and I'm sure I'll find similar issues.

    Thanks to all who helped (especially Gilamonster).

  • Most excellent. Thanks for the update.

    Jason...AKA CirqueDeSQLeil
    _______________________________________________
    I have given a name to my pain...MCM SQL Server, MVP
    SQL RNNR
    Posting Performance Based Questions - Gail Shaw[/url]
    Learn Extended Events

Viewing 4 posts - 31 through 33 (of 33 total)

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