Answer the question
In order to leave comments, you need to log in
Choose a base for the project task?
Good afternoon. I am designing a project (website). There will be a base, the main table will contain about 50,000 rows.
In each line, there will be a column in which there will be from 5 to 100 words (keywords) separated by some character. When opening each page, a morphological search (by keywords) will be performed on this table, and it will form which lines to show on it. I plan to use the search technology shpinx.
Now I want to use the Msql database, also laravel. I plan to cache the pages for a day, so as not to drop the site, by constant search during the formation of each page. It seems that caching should save, but it may be worth paying attention to some other database, besides, laravel offers: MySQL, PostgreSQL, SQLite and SQL Server out of the box. As I understand it, the main load on the database will come from the search, like spinx should reduce it with its indexing.
In general, I hope to get advice on which database to use in this situation, maybe use a different search technology, maybe someone had experience in similar tasks. Thank you for your attention.
Answer the question
In order to leave comments, you need to log in
In each line, there will be a column in which there will be from 5 to 100 words (keywords) separated by some character.
Will 50K rows have different keywords?
Perhaps it makes sense to create additional tables?
Lines
id
Keywords
id | title | (possibly parent_id)
LinesKeywords
id | lines_id | keywords_id
It seems to me that it will work faster in this form.
1) You score on SQLite and SQL Server, the first is not about that, the second is for windows.
2) no matter how you design the database, and no matter what you choose Mysql or Postgres, only the indexing request for the sphinx will differ, which in any case will give you the primary key of the document you need, and selecting by PK in any database is an elementary operation . Caching is not needed, the sphinx will not even notice your maximum 5,000,000 words.
on laravel you will probably use an ORM, so for you what is postrgers what is mysql. Well, except that mysql is more boxed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question