Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Subscription rules are over-complicated and have a hefty performance impact on the broker #717

Closed
SeanFeldman opened this issue Jun 22, 2018 · 0 comments

Comments

@SeanFeldman
Copy link
Contributor

SeanFeldman commented Jun 22, 2018

Current implementaiton of SQL filter for the transport have a needless complicated filter structure that could be simplified. This complex filtering has a heavy performance impact on the broker as all conditions of the rules are evaluated and no short circuiting is taking place.

Current SQL filter:

[{0}] LIKE '{1}%' OR [{0}] LIKE '%{1}%' OR [{0}] LIKE '%{1}' OR [{0}] = '{1}'"

Suggested simpler version:

[{0}] LIKE '%{1}%'"

The simpler version is logically equivalent to the original and covers all the cases.

@SeanFeldman SeanFeldman added this to the 9.0.0 milestone Sep 25, 2018
@SeanFeldman SeanFeldman changed the title Subscription rules are over-complicated and have a heafty performance impact on the broker Subscription rules are over-complicated and have a hefty performance impact on the broker Sep 27, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant