Rdf/3 rdf/4 ordering of results?

I’m using: SWI-Prolog version 8.1.27-20

Do the rdf/3 and rdf/4 and rdf_assert terms guarantee any ordering of results?

I’m doing lots of rdf_asserts and rdf queries and noticing that things are coming back in a different order sometimes. It could be something deep in my code but I wanted to check this off the list before getting too deep.

rdf/3 and rdf/4 mostly preserve order :slight_smile: AFAIK, database rehashing may change the order. If you load a bunch of RDF files before running queries and you do not further change the RDF data the order is preserved, but this is not a formal contract.

OK, thanks @jan . That would explain what I’m seeing. there are a lot of modifications interspersed with reads going on.