Left/Right joins performance - Need help!!

Vijay Krishna vijayakrishna55 at gmail.com
Wed Oct 8 16:41:02 CEST 2014


Hi all,

I have been comparing MySQL with MonetDB. Obviously, queries that took
minutes in MySQL got executed in a matter of few seconds in Monet.

However, I found a real blockade with joins.

I have 2 tables - each with 150 columns. Among these (150+150) columns,
around 60 are CHARACTER LARGE OBJECT type. Both the tables are populated
with around 50,000 rows - with data in all the 150 columns. The average
length of data in a CLOB type column is 9,000 (varying from 2 characters to
20,000 characters). The primary key of both the tables have same values and
the join is always based on the primary key. The rows are by default
inserted in ascending order on the primary key.

When I ran *an inner join query on these two tables with about 5 criteria
and with limit 1000, Monet processed this query in 5 seconds*, which is
completely impressive compared to MySQL's (19 seconds).

But when I ran *the same query with same criteria and limits using a left
or right joins, Monet took around 5 minutes, which is clearly way behind
MySQL's (just 22 seconds)*.

Having read a lot about Monet's blinding speed compared to traditional
relation row based DBs, I could feel that I am missing something, but
couldn't figure out what.

Can anyone please tell me why there is such a huge difference in such query
execution time and how I can prevent it?

Much grateful to have any help. Thanks a lot in advance.


P.S.: I am running Monet on Macbook Pro - 2.3 GHz Core i7 - Quad core
processor with 8 GB RAM.


With Regards,
Vijayakrishna.P.
Mobile : +91-9500402305.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.monetdb.org/pipermail/developers-list/attachments/20141008/6e150c08/attachment.html>


More information about the developers-list mailing list