pietermartin / sqlg

TinkerPop graph over sql
MIT License
246 stars 51 forks source link

No sorting on Postgres level #77

Closed maximmi closed 8 years ago

maximmi commented 8 years ago

I've tried this example with sorting: http://umlg.org/sqlg.html#OrderID result set is sorted properly, but actual sql query is missing "order by" clause (I've checker both Sqlg debug as well as Postgres query logs)

I am wondering about performance in case of bigger data set. Is it known bug or order not yet supported for Postgres backend?

Thanks Max

pietermartin commented 8 years ago

Sqlg is not able to pass the order by down to Postgres for all gremlins. In particular if the query has many leave nodes.

Can you show me the gremlin you are trying to run?

maximmi commented 8 years ago

I am trying to run exact same gremlin as in example in docs:

List<Vertex> result = this.sqlgGraph.traversal().V().hasLabel("A")
            .order().by("name", Order.incr).by("surname", Order.decr)
            .toList();
pietermartin commented 8 years ago

Ok then its a bug, I'll investigate.

maximmi commented 8 years ago

Thanks in advance