R
R
Roman Vakulchik2015-03-14 11:48:44
Ruby on Rails
Roman Vakulchik, 2015-03-14 11:48:44

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

2 answer(s)
S
Sergey, 2015-03-14
Protko @Fesor

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).

K
kompi, 2015-03-14
@kompi

In this case, if postgresql is already installed, I would use it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question