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

Alert History Pagination Query로 변경 #533

Open
jaeheesnet opened this issue Sep 26, 2024 · 0 comments
Open

Alert History Pagination Query로 변경 #533

jaeheesnet opened this issue Sep 26, 2024 · 0 comments
Assignees

Comments

@jaeheesnet
Copy link
Collaborator

Image

SELECT mean("cpu1min") AS "mean_cpu1min" FROM "org1"."autogen"."snmp_nx" WHERE time > now() - 10m AND "agent_host"='10.10.200.5' GROUP BY time(1m) FILL(none) ORDER BY time DESC LIMIT 5
SELECT mean("cpu1min") AS "mean_cpu1min" FROM "org1"."autogen"."snmp_nx" WHERE time > now() - 10m AND "agent_host"='10.10.200.5' GROUP BY time(1m) FILL(none) ORDER BY time DESC LIMIT 5 OFFSET 1

위 Query는 실제 Query와 다름

설명: OFFSET 기능을 활용하여 기존에 불러온 데이터를 제외하고 호출

기대효과: 기존 로직은 호출했던 데이터를 다시 호출하지만 OFFSET기능을 활용하면 한 번 호출된 데이터는 다시 호출하지 않아서 성능향상이 기대됨

주의: 중간에 새로운 데이터가 추가될 경우, 60개가 아닌 59, 58 등 중복 데이터를 제거하여 숫자가 딱 떨어지지 않음

  • Next 30 Alerts 문구에서 30 숫자 제거

추후 변경사항이 더 있을 수 있으니 개발대기

@jaeheesnet jaeheesnet moved this to Backlog in v2.1 Sep 26, 2024
@jaeheesnet jaeheesnet added this to v2.1 Sep 26, 2024
@jaeheesnet jaeheesnet self-assigned this Sep 26, 2024
@jaeheesnet jaeheesnet changed the title Alert History Query 변경 Alert History Pagination Query로 변경 Oct 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In progress
Development

No branches or pull requests

1 participant