The fastest way to save / retrieve a dictionary - SQL, text file ...?

I have a text file of words and words. It is very large - theoretically we are talking about millions of lines.

I just want to get the values ​​from the file and do it as quickly and efficiently as possible (for a web application, in Django).

My question is: what is the best way to store and retrieve values? Should they import them into SQL? Or save the file and use grep? Or put them in a JSON dictionary ...? Or in some other way?

I would be very grateful for the advice!

+3
source share
1 answer

placing them in a json dictionary would be a bad idea if you did not want to load the whole thing into memory when searching for it.

sql , . grep , - .., sql.

+2

Source: https://habr.com/ru/post/1744643/


All Articles