Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search call data by id #574

Open
xuhualin99 opened this issue Nov 15, 2024 · 3 comments
Open

Search call data by id #574

xuhualin99 opened this issue Nov 15, 2024 · 3 comments
Assignees

Comments

@xuhualin99
Copy link

The following query is sent to the postgresql (seen from homer_app log) and its execution is taking a long time:
select * from hep_proto_1_call where create_date between $1 and $2 and id in (1.08390982591e+11) limit 200
Strangely there is no index or primary key for the id field by default. After index added, the performance is still not getting better. It turns out that since its value is in scientific notation (e+11), postgresql thinks it's numeric type (not bigint) and the index is not used. We wonder where and how in homer_app this value is specified. Is it in the GUI or in the driver? This query is likely generated when user clicks on a specific sip message (after getting all messages by call-id for example). Is it possible to specify the value as integer, like 108390982591? Thanks

Copy link

Your report is appreciated. Please star this repository to motivate its developers! ⭐

@naqashsaeed
Copy link

naqashsaeed commented Nov 18, 2024

Hi @xuhualin99, I have try to reproduce your issue. So, i have one question for you that you mentioned

After index added

So how you added this index so your are getting these line in your logs:
and id in (1.08390982591e+11)

@xuhualin99
Copy link
Author

We already see id in e+11 format in the log before id index is added, which is intended as a fix but no working. It's added in the heplify-server (https://github.com/sipcapture/heplify-server/blob/90a8a5b76ecc9f487527ad43ba49d3b2ab8c49ee/rotator/pgfiles.go#L61)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants