Skip to content

weak search performance under certain conditions #22

@ThomasJejkal

Description

@ThomasJejkal

Describe the bug
Under certain conditions, search performance using the '/api/v1/dataresources/search' endpoint is unexpectedly slow. Mainly by including the ResourceType attribute, queries may cost a factor of 10. Due to relatively fast queries this effect gets relevant for very huge repositories (spotted at 84k DataResources)

To Reproduce
Steps to reproduce the behavior:

  1. Use search endpoint, e.g., http://{{HOSTNAME}}:{{PORT}}/api/v1/dataresources/search
  2. Provide a (valid) example DataResource including resourceType attribute in the request body, e.g.
{
   "resourceType":{
       "typeGeneral":"TEXT"
   },
   "publicationYear":"2019"
}
  1. Measure the response time, e.g., 2 seconds
  2. Change the example DataResource to include a full resourceType, e.g.
{
    "resourceType":{
        "typeGeneral":"TEXT",
        "value":"manuscriptMetadata"
    },
    "publicationYear":"2019"
}
  1. Measure the response time, e.g., 20 seconds
  2. Change the example DataResource again to include another top-level, primitive attribute, e.g., publisher
  3. Measure the response time, e.g., 2 seconds

Expected behavior
The expected behaviour is, that the response time does not change within an entire order of magnitude. Including resourceType will require a more complex query than querying only for, e.g., publisher and publicationYear. However, the impact should be much less and it should not depend on the number of primitive attributes within the query (see difference in measurement 5 and 7).

Screenshots
none

Desktop (please complete the following information):

  • OS: MacOS, Windows, Unix
  • REST Tool: Postman
  • Version 7.36.0

Additional context
none

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions