Set up Mergado effectively #3: The IN operator is better than OR

One of the most common tasks in Mergado is to find products that a user connects to a group he needs to work with. Intuitively, this is done with any number of OR conditions. But we have a more effective way for you. With its help, you will not slow down the performance of Mergado.

Use the IN operator

Even though the way of searching for items using the OR conditions is absolutely fine, it will take a long time for a large number of such a query.

 

[PARAM|Size] = "L" OR [PARAM|Size] = "XL"

 

An example of using the OR operator to find L or XL size T-shirts.

 

To prevent this slowdown, use the IN operator.

An example of product search with ITEM_ID 1 or 5 or 30 or 50.

In Mergado, in addition to the IN operator, the NOT IN negation (not included in the enumeration or any set) is used. So if we do not want these products, the search would be done using NOT IN:

 

ITEM_ID NOT IN ("1"; "5"; "30"; "50")

 

Use enumeration searches using the IN operator. Data will regenerate faster, and you will not slow down Mergado's performance with hundreds of values.

 

You could be also interested in:

Set up Mergado effectively #2: How to create rules correctly

Do you run an export with a large number of products in Mergado? Have you encountered a slowdown in the process of applying the rules? By setting up your Mergado export correctly, you can process the rules faster.

24.04.2019
Set up Mergado effectively #1: Queries to input values

In the Mergado team, we see our platform as a Swiss pen-knife for data feeds. Thanks to a large number of functionalities and experience of solving the cases on our support, we have realized over time that Mergado has entered a new era. To an era where we need to teach our users how to work with this Swiss knife effectively.

03.04.2019

Add new comment