Answer the question
In order to leave comments, you need to log in
Where is the fastest search?
It will be necessary to search for regular expressions in some data structure. The most important thing is search speed. Where will the fastest search be: SQL (only Postgresql can be used), JSON, or something else? json size up to 3 MB
Answer the question
In order to leave comments, you need to log in
Roman Vakulchik : Let's start with the fact that searching the database with regular expressions is a bad idea. There are all sorts of sphinxes there, elastic serchi, etc. which have quite a decent text indexing.
Describe the task more specifically. So far, all options are slower and the fastest is to keep the data in memory (DBMS, arrays, whatever) and search there. The complexity of the search will still be O (N).
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question