That’s a very good question you’ve got there, I cannot answer this - but maybe @anon29869905 can. (he’s on holiday through).
My guess is that it depends on what zammad is configured and what your search term is, I can imagine that searching for a ticket ID does not go to elasticsearch as -in my opinion- a database query should be faster here