It sounds like the database optimisation/efficiency is aimed at many players performing simultaneous searches, instead of how players search their own inventories.

If the developers had no choice but to pick between optimising for all players or optimising for individuals searching their retainers etc., then of course they're going to focus on the former.

What if adding extra slots increased the server load by multiples of the slots added? Maybe adding extra inventory slots is a big deal.