Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TEXT and BLOB from Broad tables as we know them. #560

Closed
hanjoosten opened this issue Nov 6, 2016 · 2 comments
Closed

Remove TEXT and BLOB from Broad tables as we know them. #560

hanjoosten opened this issue Nov 6, 2016 · 2 comments
Labels
component:prototype generator enhancement Indicates new feature requests

Comments

@hanjoosten
Copy link
Member

hanjoosten commented Nov 6, 2016

Problem

Attributes in tables, that have a large amount of space, like BLOB and TEXT, should be handled in separate tables, to enable better performance. In MySQL (and probably other database management systems as well), there is a penalty when joining tables that contain TEXT fields. These JOINs will create a temporary table on disk, not in memory. This impacts performance significantly.

Current situation

relations that are UNI are currently stored into the concept table of the source of the relation. Whenever the TType of the target of such a relation is represented in SQL as TEXT (or BLOB etc) then this causes the problematic effect.

Solution

We could take the TType of the target into account, when deciding to implement the relation in a concept table. Instead of putting it into the concept table of the source concept, we could store the relation into a separate BinSQL table, which would then be the lookup table for that relation. This will speedup all joins where that specific relation is not part of the expression, but any other part of the expression uses the concepttable it would otherwise be stored in.

@hanjoosten hanjoosten added enhancement Indicates new feature requests component:prototype generator labels Nov 6, 2016
@hanjoosten
Copy link
Member Author

hanjoosten commented Nov 6, 2016

The nice thing is of course, that this would only impact the generation of plugs.

@Michiel-s
Copy link
Member

I propose to close this issue. I haven't experienced any issues with this so far. We also don't have any statistics on the performance penalty. Furthermore, refactoring to a separate tabel for TEXT and BLOB is a large cost. More costly than increasing cpu or memory when needed.

We use ROW_FORMAT=DYNAMIC for our tables which optimized variable length columns already. Not sure what the effect is on JOIN performance

https://mariadb.com/kb/en/innodb-row-formats-overview/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:prototype generator enhancement Indicates new feature requests
Projects
None yet
Development

No branches or pull requests

2 participants