R
R
Romi2021-05-06 17:38:43
Database
Romi, 2021-05-06 17:38:43

On what platform (DB) is it best to do the search for the largest number of matches between records with many fields?

Hello.

The following functionality is planned:

1. There is an entity with a large number of fields (say, tens, hundreds of mb) of the enum type, mb even just 1 or 0.

2. There are many records in it, say - millions.

3. It is necessary to make a selection for any record, in which the records with the maximum number of matches in these fields will be the first.

well, for example, the entry has fields: values

​​{f1 : 0, f2 : 1, f3 : 1, f4 : 0}

and the second entry:

{f1 : 1, f2 : 1, f3 : 1, f4 : 1}

respectively - two matches between them.

And there are dozens of such fields, and thousands (millions) of records.

I want to make it on Laravel :) And what other engine, besides MySQL, is suitable for implementing this?

Or take MySQL and not take a steam bath? ))

And if MySQL - how better? Just make one table and an index for each field and that's it?

What do you think?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question