Is there a quick way to check for all named graphs in a db?
We are running a "select distinct ?g where {graph ?g {?s <specific_low_use_predicate> ?o}}" but performance is still over a minute. (We have about 150 named graphs.)
It is bad indeed and strongly suggests db optimize is needed (unless your named graphs aren't added/deleted, in which case we need to investigate what's going on).
It's possible. Lots of data writes without db optimize likely means the data is scattered over a large number of files. Reading those files during query evaluation will consume more memory than if the data layout was optimal.
But the biggest factor here is that reads get slower as they have to i) read more files, ii) skip over deleted data.
Yes, db optimize runs transparently to concurrent operations.