Thanks for pointing that, r937. book_author should not be there. However, this is not the real database I'm having problems with, this is meant to serve as a concise illustration of the problem.
Unfortunately GROUP_CONCAT does not help much, the join would still be huge (5 tables again) and I...
@r937: this is one of the reasons for sure. But the main problem is the huge (even for only few records in the tables) cartesian product of those 5 tables.
the above tables are just to illustrate the problem, the real DB being more large (and the tables have more columns).
The indexes are on the 'id' fields. Any advices?
Thanks.
Hello
I am using associative tables in a database and I have problems when I have to simultaneously query multiple tables.
As a simplified sketch of what I mean, these tables are given:
books:
book_id, book_title, book_author
authors:
author_id, author_name
books_authors_assoc...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.