Chào mọi người, em đang tìm hiểu về event sourcing và có thắc mắc như sau ạ. Khi số lượng các event trong database quá nhiều, thì mình làm cách nào để có thể tối ưu hóa thời gian thực hiện câu query trong bảng đó ạ. Cảm ơn mọi người
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Anh nhớ lần cuối anh làm kiểu dùng database này là anh có 1 bảng lưu các event gửi đến kiểu này:
Thì anh sẽ dùng 1 thread duy nhất để query liên tục vào bảng event này và theo latest eventId kiểu này:
Như vậy nó rất là nhanh em ạ.