Editor mjoin with large amount of records fails.

Editor mjoin with large amount of records fails.

naspersgaspnaspersgasp Posts: 53Questions: 14Answers: 1

Hi,

Good day.

The distinct selection just hangs and takes way too long to complete. Error returned:

select distinct `Recipes`.`id` as `dteditor_pkey`, `Images`.`id` as `id` from `Recipes` right join `RecipeImage` on `Recipes`.`id` = `RecipeImage`.`recipe_id` right join `Images` on `Images`.`id` = `RecipeImage`.`image_id`

What is it exactly trying to do? My image count is not that high. 28000 files. Any help would be appreciated. Thanks.

Regards.

This question has accepted answers - jump to:

Answers

  • naspersgaspnaspersgasp Posts: 53Questions: 14Answers: 1

    Some more information that might be useful. There are 25000 Recipes. This does not seem to be a very large amount.

  • allanallan Posts: 52,496Questions: 1Answers: 8,012 Site admin
    Answer ✓

    You are right, its not many, but its enough that it might cause the current Mjoin implementation some issues. What is the server-side environment that you are using - PHP, .NET or NodejS?

    Allan

  • naspersgaspnaspersgasp Posts: 53Questions: 14Answers: 1

    Hi,

    Good day.

    It is node, and look it was on my local environment as well. Then I put it on a live environment with a beafier MySQL instance and it is still very slow. This is kind of a duplicate for a previous issue I raised https://datatables.net/forums/discussion/51208/editor-upload-many-returns-all-files-in-database.

    Had to hack away at the node source again. So far I've managed to get the ids of the records that would be returned. From there I've added a whereIn clause to the mjoin class. That way we are only dealing with rows that would be returned via ajax.

    It seems to work. For now :-). It's not the best code, so won't create a PR just yet. Thanks.

    Regards.

  • allanallan Posts: 52,496Questions: 1Answers: 8,012 Site admin
    Answer ✓

    Your original issue is something I'm going to be working on next week in preparation for Editor 1.8.

    Allan

  • naspersgaspnaspersgasp Posts: 53Questions: 14Answers: 1

    Hi,

    Cool buddy. Thanks.

    Regards.

This discussion has been closed.