Hi ,
yes it's a view. I have optimize the query . it's runs fine with the clause "set transaction read only" and also it's run fine with our production db.

Kdev.