# What is the key factor of the query performance?

**URL:** <https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974>\
**Category:** Metadata Retrieval\
**Tags:** rest-api, metadata-retrieval\
**Created:** [27 September 2022 11:38 UTC](https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974 "2022-09-27T11:38:10Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![geoffreychen777](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/geoffreychen777/32/786_2.png) [@geoffreychen777](https://community.crossref.org/u/geoffreychen777)\
**Post date:** [27 September 2022 11:38 UTC](https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974/1 "2022-09-27T11:38:10Z")

</div>

When I do a query by title, sometimes it is very slow to get the response, even with the ‘mailto’ parameters.

For example (I hide my email here):

`http://api.crossref.org/works?query.bibliographic=%22Faster%20R-CNN:%20Towards%20Real-Time%20Object%20Detection%20with%20Region%20Proposal%20Networks%22&mailto=xx@xx.xx`

Usually it costs 3-5s to get the response. But sometimes it will cost about 8-10s.

Could you please explain which part during this query takes the most time? Is it the network? QOS? or the database inner query time? If it is the qos, could you please share me the estimate query time for a Crossref Plus tier?

Best wishes.

---

<div class="post-metadata">

**Author:** ![ifarley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/ifarley/32/44_2.png) [@ifarley](https://community.crossref.org/u/ifarley)\
**Post date:** [28 September 2022 18:45 UTC](https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974/2 "2022-09-28T18:45:27Z")

</div>

Hi @geoffreychen777,

Thanks for your message! What kind of query were you doing that returned results in 3-5s? Were there fewer terms in your `query.bibliographic` parameter? The more terms included in the `query.bibliographic` parameter, the greater the likelihood that your query will take more time for us to return results.

This query: [http://api.crossref.org/works?query.bibliographic="Faster%20R-CNN:%20Towards%20Real-Time%20Object%20Detection%20with%20Region%20Proposal%20Networks"&mailto=xx@xx.xx](http://api.crossref.org/works?query.bibliographic=%22Faster%20R-CNN:%20Towards%20Real-Time%20Object%20Detection%20with%20Region%20Proposal%20Networks%22&mailto=xx@xx.xx) is querying for each of these words/terms:

`Faster`, `R-CNN:`, `Towards`, `Real-Time`, `Object`, `Detection`, `Region`, `Proposal`, and `Networks`

So, the API is searching the bibliographic metadata for each of the 138 million plus records in our corpus for each of those words and then returning results ordered by the metadata that matches each and all of those search terms most closely (i.e., it’s an expensive query).

That said, we have had some instances of slower [response times in the Polite pool](https://status.crossref.org/#week) this week:

 ![Screen Shot 2022-09-28 at 1.41.34 PM](https://us1.discourse-cdn.com/flex020/uploads/crossref/original/1X/88f76975d26f91236f9e76074461030ca69bbced.png)

so, depending on the timing of this query, the slower response time might also be related to overall traffic on the pool.

If you can contact me at [support@crossref.org](mailto:support@crossref.org), we can provide you with some additional details about the Metadata Plus service (and, thus, the Plus pool of the REST API).

My best,  
Isaac

---

<div class="post-metadata">

**Author:** ![geoffreychen777](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/geoffreychen777/32/786_2.png) [@geoffreychen777](https://community.crossref.org/u/geoffreychen777)\
**Post date:** [29 September 2022 13:49 UTC](https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974/3 "2022-09-29T13:49:12Z")

</div>

Thank you for your answer, I’ve contacted you through the email. Looking forward to your replay!

Best,

---

<div class="post-metadata">

**Author:** ![ifarley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/ifarley/32/44_2.png) [@ifarley](https://community.crossref.org/u/ifarley)\
**Post date:** [29 September 2022 21:34 UTC](https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974/4 "2022-09-29T21:34:31Z")

</div>

A note to others reading along:

There’s a couple of different options that might be more efficient than the REST API query we discussed above, but it depends on what you need from us (and/or what you are querying against):

1. you could limit number of rows you request of us, like this: [**http://api.crossref.org/works?query.bibliographic=“Faster%20R-CNN:%20Towards%20Real-Time%20Object%20Detection%20with%20Region%20Proposal%20Networks”&rows=5&mailto=xx@xx.xx**](http://api.crossref.org/works?query.bibliographic=%22Faster%20R-CNN:%20Towards%20Real-Time%20Object%20Detection%20with%20Region%20Proposal%20Networks%22&rows=5&mailto=xx@xx.xx) **;** this result is much faster and only providing the top five results
2. you could also just take the search directly to [search.crossref.org](http://search.crossref.org/), like this: [https://search.crossref.org/?q=Faster+R-CNN%3A+Towards+Real-Time+Object+Detection+Region+Proposal+and+Networks&from\_ui=yes](https://search.crossref.org/?q=Faster+R-CNN%3A+Towards+Real-Time+Object+Detection+Region+Proposal+and+Networks&from_ui=yes)
3. Lastly, our Simple Text Query form does a good job of matching DOIs if a fuller citation is provided; you can try it yourself here: [Simple Text Query](https://apps.crossref.org/SimpleTextQuery/)

I’m searching for: `Ren, Shaoqing, Kaiming He, Ross Girshick, and Jian Sun. “Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks.” IEEE Transactions on Pattern Analysis and Machine Intelligence 39, no. 6 (June 1, 2017): 1137–49.`

And, getting these results:

 ![](https://us1.discourse-cdn.com/flex020/uploads/crossref/original/1X/8488eddbf28bf4ea388a0a94378ebd476ec3de85.png)

---

<div class="post-metadata">

**Author:** ![geoffreychen777](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/geoffreychen777/32/786_2.png) [@geoffreychen777](https://community.crossref.org/u/geoffreychen777)\
**Post date:** [29 September 2022 22:00 UTC](https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974/5 "2022-09-29T22:00:58Z")

</div>

Hi, Thanks for your reply.

What I’m trying to do is very simple:

I’m developing an APP that can be used to retrieve metadata for some paper PDF files. But I do not have the full reference text and doi of those papers. So I can only parse the PDF files to get the titles, DOIs of them. For a paper, if there is a DOI in the PDF, it is easy to get its metadata. But some papers have no DOI in their PDF files. So the only option is to do a query like this:

`http://api.crossref.org/works?query.bibliographic=“TITLE_OF_PAPER”&rows=5&mailto=xx@xx.xx`

I tired to limit the rows. But sometimes I still need to wait for even 16s to get the query response.

Following your suggesstion, I tried the Simple Text Query. I found that I need to provide at least: the first author, title, and year, to get the DOI response. This doesn’t seem feasible in my scenario. And according to the API document, Simple Text Query is for human, not machine. I’m not sure I can do this Simple Text Query programmably.

Seems that there is no more efficient solution to my query. Anyway thanks for your suggestions.

---

<div class="post-metadata">

**Author:** ![ifarley](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/ifarley/32/44_2.png) [@ifarley](https://community.crossref.org/u/ifarley)\
**Post date:** [7 October 2022 20:58 UTC](https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974/6 "2022-10-07T20:58:53Z")

</div>

Hi @geoffreychen777 ,

I talked with Patrick Polischuk, the product manager responsible for metadata retrieval, and he reminded me that we do have some feature development on the roadmap that should fit this use case a lot better: [[CR-555] - Jira](https://crossref.atlassian.net/browse/CR-555). The work is just in the research and planning phase, as you can see from [our public roadmap](https://trello.com/b/02zsQaeA/crossref-roadmap), but we’ll get there in the longer term.

-Isaac

---

<div class="post-metadata">

**Author:** ![geoffreychen777](https://sea2.discourse-cdn.com/flex020/user_avatar/community.crossref.org/geoffreychen777/32/786_2.png) [@geoffreychen777](https://community.crossref.org/u/geoffreychen777)\
**Post date:** [7 October 2022 21:10 UTC](https://community.crossref.org/t/what-is-the-key-factor-of-the-query-performance/2974/7 "2022-10-07T21:10:18Z")

</div>

Thanks for your info.

Looking forward to this feature!
