dbis-uibk / relax

RelaX - a relational algebra calculator
http://dbis-uibk.github.io/relax/
MIT License
285 stars 98 forks source link

Bug in the RelaX SQL that crashes Chrome and Firefox #116

Closed Henriquemcc closed 2 years ago

Henriquemcc commented 4 years ago

On the RelaX - relational algebra calculator, when I load the IMDB database and type the following SQL command:

SELECT movies.name, actors.first_name, roles.role
FROM actors, movies, roles
WHERE actors.id = roles.actor_id
AND movies.id = roles.movie_id
AND movies.rank > 6

and them click on 'execute query', on both Firefox and Google Chrome, the RelaX web page stop responding.

olberger commented 3 years ago

AFAIU, the joins aren't detected well, and this leads to a cartesian product being applied, which results in OOM or some other kind of combinatory explosion.

I'd suggest to test with an INNER JOIN variant, to see if that works, instead.

Hth,

r-prem commented 2 years ago

As @olberger correctly stated, it is because of the cross joins. Included in the commit eda00d0 is a warning if the app thinks a OOM error might occur.