Re: Making queries with custom SQL

2016-06-16 Thread Javier Guerra Giraldez
On 16 June 2016 at 16:21, TheBeardedTemplar wrote: > I'm using postgreSQL and have found that recursive queries are exactly what > I need In most cases it's much better to use a more efficient form of tree. A common one is called MPTT, for which there are Django

Making queries with custom SQL

2016-06-16 Thread TheBeardedTemplar
Hey everyone, The bulk of my database consists of a tree of models (called Node), more than 200,000 of them, and I very regularly need to make large queries to get subtrees which I'm finding is causing a significant slowdown. I'm using postgreSQL and have found that recursive queries