Missing join predicate

· Uncategorized
Authors

A simple typo can have serious consequences.

SELECT * FROM t1 INNER JOIN t2 ON t1.c1=t1.c1

Generates a ‘missing join predicate’ warning and a Cartesian product. In our case filling up 500GB TEMPDB space and a never ending query.

Some good advice, check your query plan for ‘missing join predicate’ warnings.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: