Is it a good idea to use MySQL and Neo4j together?

前端 未结 4 2079
余生分开走
余生分开走 2020-12-22 23:25

I will make an application with a lot of similar items (millions), and I would like to store them in a MySQL database, because I would like to do a lot of statistics and sea

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-22 23:31

    You can improve the query by using IN:

    SELECT *
    FROM items
    WHERE item_id IN (45, 345435, 343, 78, 4522, 676, 443, 4255, 4345)
    

    It is also not entirely true that relational databases are bad at storing tree structures. Certainly MySQL is missing some functionality which would make it easier, but most other databases support it well. Oracle has CONNECT BY. Most of the mainstream RDBMS have some form of recursive queries - MySQL being a notable exception. Perhaps you could take a look at PostgreSQL and see if that meets your needs?

提交回复
热议问题