How to improve the performanc of even query based on DE and value filter?

I found do event query based on filter of DE 's value will cost more time,is there some way to improve?


for about 500000 events, query an eventts will cost about 10s.


1 Like

Hi @linxd,
Are you using the fields=[specific fields that you want] in your request?

As @austin always recommends to use fields to request a specific number of fields (which will surely improve the performance) ,

used, but almost the same.

If I modeling the search attribute as tracker program’s tracker type ,the searched attribute be setted as searchable, will this promote the search performance?

1 Like

Hi @linxd,

Would it be possible for you to test the performance of the queries you are using in the play / demo instances? See if there’s any difference and make note please!

Interesting question, did you try to do it? If you do maybe you will tell us whether this method worked for you or not!

Thank you! :+1:

How about adding paging to the query? (:

skippages? skipPaging=true&totalPages=false

almost just return one event. so ,paging is no more important ,I think, and I have a try ,almost the same.

I found add the event as an tracker entity , can gain high performance of query on entity’s attribute .

It’s supposed to return by default 50 (so how come it’s returning one event only?) You can choose the number of events when you use the pageSize Parameter such as pageSize=55

I would like to make a suggestion if you would like to try the different formats:
(and maybe if getting the result as a file is useful too then you have these options):

Please share an example! Do you mean requesting the events per TEI? Thanks!

will cost 6-7s for searching from about 400000 events.


will cost 1-2s for searching from about 400000 trackedEntityInstances.

1 Like

That’s a great comparison, thanks for sharing! Does it mean we can mark your post above as a solution to this particular issue? Thank you! :blush:

I don’t think so, can every event program be map as an tracker program? and how about searching tracker’s events?

Hey @linxd,

Only tracker programs have tracked entity instances, so /trackedEntityInstances endpoint won’t work for event programs. However, /events endpoint will work for both tracker and event programs as both tracker and event programs can have events. Regarding performance, we are working to improve it, and we have a jira issue for /events endpoint. Could you please write a comment on the issue describing your case?


1 Like

I mean the performance of tracker program stages (i think as events in tracker program).