we should merge mainn's performance tuned query (after testing for correctness of course) into mainline to optimize the performance of the browse pane.