How to use INNER JOIN?

274 views
Skip to first unread message

Pavel Polívka

unread,
Mar 2, 2012, 5:12:40 AM3/2/12
to not...@googlegroups.com
Hi,

I've been experiencing very long execution times on some specific queries when using LEFT JOIN. I found out, that MSSQL server is using "bad" execution plan (many paralisms, using worktables, etc.) for such query. When I changed one problematic LEFT JOIN to INNER JOIN everything went fine - in numbers: From about 90 seconds to less than one second and the execution plan is flawless now.

Is there any way how to use INNER JOIN instead of LEFT JOIN, or are there plans to implement it?

I've already made some customizations to NotORM (because this problem was crucial for me) and implemented following construction:
$table->select('table1..column') or rather $table->select('table1::column') which generates INNER JOIN instead of LEFT JOIN but I'd like see support for this in default NotORM.

Thanks for any information about this topic.


Jakub Vrana

unread,
Dec 21, 2013, 10:11:51 AM12/21/13
to not...@googlegroups.com
NotORM doesn't support INNER JOIN. The best way is usually to avoid all
joins and use NotORM's relations.

Jakub
Reply all
Reply to author
Forward
0 new messages