[systemd-devel] order of sd_journal_query_unique()?

Daurnimator quae at daurnimator.com
Fri Mar 6 11:38:55 PST 2015

On 6 March 2015 at 14:25, Chris Morgan <chmorgan at gmail.com> wrote:
> I was using a journal iterator to search from the newest journal entry
> backwards for a matching field, using SD_JOURNAL_FOREACH_BACKWARDS.
> This appears to be pretty slow but journalctl is really fast. I went
> looking and found sd_journal_query_unique() (although I'm not 100%
> positive this is why journalctl is faster).
> Looking at http://www.freedesktop.org/software/systemd/man/sd_journal_query_unique.html
> there isn't any mention of ordering or direction.
> Is this search finding journal entries that are newest to oldest or???

sd_journal_query_unique() finds unique *field names*.
Not journal entries.

More information about the systemd-devel mailing list