Improving Record Retrieval Speed from Typesense
TLDR Yoshi sought ways to accelerate Typesense record retrieval. Jason advised upgrading to high availability and using the documents/export endpoint. They also noted a high volume of writes consuming significant CPU capacity as a possible performance factor.
1
Sep 08, 2023 (3 months ago)
Yoshi
04:52 PMI originally started with a for loop of 250 records, but this is very slow, as each request takes about 2-3 seconds.
I then tried parallelizing it, but any kind of parallelization (even 2 queries at a time) results in Node timing out.
Federated queries also time out when trying to return over 250 records.
Anyone have any thoughts on how this can be improved?
Jason
05:01 PMfound
parameter in the API response)Jason
05:01 PMYoshi
05:08 PMHere is our query:
{
q: '*',
filter_by: 'address_state:!=[`AL`]',
page: 1,
per_page: 25,
query_by: 'company_name, contact_names, phone_numbers, website, organization_company_statuses',
sort_by: 'number_of_enriched_fields:desc,company_display_name:asc',
typo_tokens_threshold: 0,
drop_tokens_threshold: 0
}
Yoshi
05:19 PMJason
05:37 PMJason
05:38 PMJason
05:39 PMCorrect. The first time you enable HA, you will experience downtime
Yoshi
05:48 PMIt looks like export does not have any way to limit or paginate, is that correct? it will always just return the full dataset?
Jason
05:49 PMJason
05:51 PMYoshi
06:17 PM1
Typesense
Indexed 3015 threads (79% resolved)
Similar Threads
Optimizing Typesense Implementation for Large Collections
Oskar faced performance issues with his document collection in Typesense due to filter additions. Jason suggested trying a newer Typesense build and potentially partitioning the data into country-wise collections. They also discussed reducing network latency with CDN solutions.
Revisiting Typesense for Efficient DB Indexing and Querying
kopach experienced slow indexing and crashes with Typesense. The community suggested to use batch import and check the server's resources. Improvements were made but additional support was needed for special characters and multi-search queries.
Multiple Filters and JSON Requests in Typesense
Manish asked about multiple filter_by arguments, JSON input, and using multisearch. Jason offered typesense documentation links, examples, and how to use JSON formatted requests with multisearch. Ed shared a similar use case.
Resolving Typesense Cloud Cluster Issue with Cron Job
Issei reported a problem with an unhealthy Typesense Cloud cluster. With the particular help of Jason and Kishore Nallan, they discovered that a problematic cron job was responsible. A solution, using a different endpoint for data export, was agreed on and implemented.
Enhancing Vector Search Performance and Response Time using Multi-Search Feature
Bill faced performance issues with vector search using multi_search feature. Jason and Kishore Nallan suggested running models on a GPU and excluding large fields from the search. Through discussion, it was established that adding more CPUs and enabling server-side caching could enhance performance. The thread concluded with the user reaching a resolution.