What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Good day everyone, I have a question related to Spryker Touch feature. We have two imports running -

U013EK8RD7A
U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet
edited October 2020 in Help

Good day everyone, I have a question related to Spryker Touch feature. We have two imports running - product import and category import. The imports use facade methods for certain operations, which then execute updates against spy_touch table. What we’re experiencing is that sometimes simple update query UPDATE "spy_touch" SET "touched"=$1 WHERE "spy_touch"."id_touch"=$2 takes 20 minutes or more. Deeper investigation lead to an assumption that this might be caused by the way how Postgres is doing updates on indexed fields internally. Turns out touched field is indexed. We have close to 4kk entires in touch table.

Has anyone else experienced similar behaviour and have some hints how to tackle it?

Comments

  • i think most people here never came into contact with the concept of touch and collectors

  • but i think you are already giving a good approach on how to handle this in the question

  • have you considered dropping (or deactivating) and then recreating the index after the query?

  • a big, volatile index can have significant impact on write-heavy scenarios

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet

    In general is this touch concept is needed in newer shops. I've heard somewhere that its kind of an old approach and was replaced by pub&sub? Or am I mistaking something?

  • publish&synchronize, correct

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet
    edited October 2020

    Sorry I meant in OLDER shops

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet

    I wrote newer...

  • sure, yes. this concept is not used anymore

  • in new projects

  • Unknown
    edited October 2020

    but that does not solve your problem, i guess 😊

  • so, i recommend to try bypassing the index during write/update here

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet

    Well if we would remove this package it would be gone.

  • and also its functionality would be gone 🤔

  • there is probable a reason you still have, no?

  • does the above query even take 20 mins when you try to execute it manually against a single id?

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet

    Its there because it was there as a default 1 or 2 years ago. Now we're updating the code base to second latest Spryker release

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet

    It happens randomly

  • U013EK8RD7A
    U013EK8RD7A Posts: 127 🧑🏻‍🚀 - Cadet
    edited October 2020

    Few iterations run without a problem, then suddenly it get stuck. Then again back to normal for few iterations and so it goes

  • even when executed with the same id?