1

If a cyclic graph is stored in adjacency list model, then we query using CTEs which is very slow. But if there is a way to convert adjacency list model of cyclic graph into nested set model, then I guess the queries might run a little faster. I know that for a tree it is possible to convert but I didn't find a method in case of graph, especially cyclic graphs.

If we can't convert to nested set model then what is the best method to store and query cyclic graphs in RDBMS other than adjacency list and CTEs?

Sai Ram
  • 101
  • 1
  • 3
  • Which DBMS are you using? You should also post the query that is slow and its execution plan. –  Dec 30 '15 at 09:52
  • I am using SQLite and some general queries like computing transitive closure at a certain depth. – Sai Ram Dec 30 '15 at 10:43

0 Answers0