开发者

What is the easiest way to see which join is responsible for an entry not being shown

开发者 https://www.devze.com 2022-12-12 20:26 出处:网络
I have this db with lots of tables and frequently I have to an开发者_JAVA技巧swer the question: Why is entry x not being shown?

I have this db with lots of tables and frequently I have to an开发者_JAVA技巧swer the question: Why is entry x not being shown?

Often I have an idea which entry might be the reason, but more often its wild guessing and trying.

This gets boring after some time. Is there a tool out there where I enter the joins and the key of the entry that I want to have and the tool tells me: This entry stops to have joins in table x.


Another suggestion is to change the JOIN (which is INNER by default) to a LEFT JOIN one-by-one.


Make a new select statement and change INNER JOINs to OUTER JOINs and add 'where id=foo' to pick out the object you are interested in. Look for NULLs in the result.


Just include a column from every join in the query. The first column that is NULL will be the first join that fails.

0

精彩评论

暂无评论...
验证码 换一张
取 消