Media api search is much slower than item search

Hey John,

Still at about 1.35 seconds after the analyze.

If there is still a issue for that, it is the issue i fixed with this composite index in pr Performance/mariadb by Daniel-KM · Pull Request #2096 · omeka/omeka-s · GitHub :

ALTER TABLE `resource` ADD INDEX `idx_public_type_id_title` (`is_public`,`resource_type`,`id`,`title` (190));
ALTER TABLE `value` ADD INDEX `idx_public_resource_property` (`is_public`,`resource_id`,`property_id`);

A composite index on this query is useful since this is the most often used query.

But probably a specific index in value for value_resource_id may be useful too for base with many linked resources:

ALTER TABLE `value` ADD INDEX `idx_public_valueresource_property` (`is_public`,`value_resource_id`,`property_id`);

I added three more indexes on is_public too, but they are that are useless if you use the ones above:

ALTER TABLE `resource` ADD INDEX `is_public` (`is_public`);
ALTER TABLE `value` ADD INDEX `is_public` (`is_public`);
ALTER TABLE `site_page` ADD INDEX `is_public` (`is_public`);

Can you try with them?

I’ll take a look at this when I get a chance—thanks!