We've calculation view which combines transaction data with master data attribute tables using LEFT OUTER JOIN. Transaction data table has approx. 800+ million records. If I run COUNT(*) on transaction data table, it returns the result in less than 3 sec. If I perform COUNT(*) on calculation view, it runs forever and fails with memory allocation. It seems like COUNT(*) is done after selecting entire dataset (800+ million records) and executing all JOINS.
Has anyone come across similar issue and any pointers for performance improvement with COUNT(*)?