geocollections / geokogud2

Eesti geokogude infosüsteem
https://geocollections.info
GNU Affero General Public License v3.0
0 stars 0 forks source link

specimen image search very slow #139

Closed ollehints closed 6 years ago

ollehints commented 6 years ago

It seems that after last update the specimen image search became very slow, 34 seconds to get: http://geocollections.info/specimen?specimen_number_1=1&specimen_number=&collection_id_1=1&collection_id=&classification_1=11&classification=&taxon_1=11&taxon=&name_geology_1=1&name_geology=&country_1=1&country=&locality_1=1&locality=&stratigraphy_1=11&stratigraphy=&id_1=5&id=&depth_since_1=12&depth_since=&depth_to_1=13&depth_to=&agent_1=1&agent=&reference_1=1&reference=&original_type_1=1&original_type=&part_1=1&part=&date_taken_since_1=12&date_taken_since=&date_taken_to_1=13&date_taken_to=&dbs%5B%5D=1&dbs%5B%5D=2&dbs%5B%5D=3&dbs%5B%5D=4&dbs%5B%5D=5&dbs%5B%5D=6&currentTable=specimen&maxSize=5&search_images=1&paginateBy=25&sort=id&sortdir=DESC.

If used together with other criteria, nothing is returned: http://geocollections.info/specimen?specimen_number_1=1&specimen_number=&collection_id_1=1&collection_id=GIT%20625&classification_1=11&classification=&taxon_1=11&taxon=&name_geology_1=1&name_geology=&country_1=1&country=&locality_1=1&locality=&stratigraphy_1=11&stratigraphy=&id_1=5&id=&depth_since_1=12&depth_since=&depth_to_1=13&depth_to=&agent_1=1&agent=&reference_1=1&reference=&original_type_1=1&original_type=&part_1=1&part=&date_taken_since_1=12&date_taken_since=&date_taken_to_1=13&date_taken_to=&dbs%5B%5D=1&dbs%5B%5D=2&dbs%5B%5D=3&dbs%5B%5D=4&dbs%5B%5D=5&dbs%5B%5D=6&currentTable=specimen&maxSize=5&search_images=1&paginateBy=25&sort=id&sortdir=DESC

enmust commented 6 years ago

Okay seems like when I added attach_link__specimen etc fields to default returning fields then API starts taking too much time.

enmust commented 6 years ago

But this brakes #136