debug sorting of where clause