๐—ฆ๐—ฐ๐—ฎ๐—น๐—ถ๐—ป๐—ด ๐—ฉ๐—ถ๐—ฑ๐—ฒ๐—ผ ๐—ฅ๐—ฒ๐—ฐ๐—ผ๐—บ๐—บ๐—ฒ๐—ป๐—ฑ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—ฆ๐˜‚๐—ฟ๐—ฟ๐—ฒ๐—ฎ๐—น๐——๐—•

I hit a wall with my recommendation system.

I used SQLite for everything. Search was fast. Recommendations were slow.

Some queries took 2.1 seconds. Users stopped watching. The problem was the data structure.

I moved the recommendation layer to SurrealDB.

SurrealDB treats relationships as primary data. One graph query replaces 40 lines of SQL.

The speed results:

I learned three lessons:

Graph databases win when you focus on relationships.

Source: https://dev.to/ahmet_gedik778845/using-surrealdb-graph-queries-for-video-recommendation-at-scale-5ecd