Database Transaction Implementation Techniques in Logic Layer for Golang Backend

Database transactions are a crucial aspect in application development, especially in projects that demand high data consistency. This article will discuss how to perform database transactions in the service layer (logic), while maintaining clean architecture principles and separation of concerns. ...

October 12, 2024 · 10 min · 1920 words · Muchlis

Pagination Optimization: Why Limit-Offset Can Be a Time Bomb and Cursor Pagination as the Solution

Pagination is a technique for dividing database query results into smaller chunks. Using LIMIT OFFSET queries is the most commonly used method. However, this method has several weaknesses, especially in terms of performance on very large datasets. This article will discuss problems that arise when using LIMIT OFFSET and explore more efficient alternatives, such as cursor-based pagination and seek method. ...

August 11, 2024 · 12 min · 2492 words · Muchlis