If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

SQL performance question

I have a view that is running as slow as hell with the addition of one line ("and catastrophe_key = 1005") is included in the view, but if I do a select of the view and put the "catastrophe_key = 1005" in the where ie: select * from the_view where catastrophe_key = 1005
it runs very fast, but if that is in the view its slow, any ideas? the view is included below.