How to alter and debug views queries? I'm trying to find the hook/module which can modify a views query.

The view is from Workbench module which is displaying the draft's of the actual user.

If I Disable SQL rewriting in the Query settings the display is ok,
so something is interfering.

What would be the method to debug?
We can alter a views query using hook_views_query_alter. Try to search in your codebase for this string views_query_alter, you should get a function in one of the custom module which is implementing hook_views_query_alter.

If it doesn't help, try to enable query log using devel module, so you will know what query are being executed for that page. Views also gives the sql query that a particular display will run. See if these two sql queries don't match. You can see the diff and then try to figure out which module might be adding the additional conditions to that query.