SShortSingh.
Back to feed

Keyset Pagination Outperforms OFFSET Queries on Large Datasets, Dev Shows

0
·2 views

A developer has published an open-source .NET library called SeekKit that replaces traditional OFFSET-based pagination with keyset pagination for Entity Framework Core. Standard OFFSET queries slow down significantly at high page numbers because the database must scan all preceding rows, making cost proportional to the offset size. Keyset pagination instead uses a cursor pointing to the last seen row, allowing the database to jump directly to the next set of results. The library supports SQL Server, PostgreSQL, and MySQL, handles mixed sort directions, and optionally signs pagination tokens via HMAC for security. The author is seeking community feedback and has published a runnable example with a multi-million-row seed dataset on GitHub.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Five Editorial Decisions to Make Before Using AI to Write Anything

A developer-focused guide argues that weak AI-generated drafts stem not from poor prompts but from skipped editorial decisions made by the human writer. The author recommends filling a five-line brief covering audience, intended takeaway, source material, opening point, and the scope delegated to AI before any drafting begins. Without a specific, defined reader, AI output tends to produce fluent but directionless prose that leaves no lasting impression. The piece warns that increasingly capable AI models can mask the absence of editorial intent by generating polished text that still lacks purpose. The core argument is that shifting decision-making back to the human — before the prompt is written — is what separates a writing workflow from a writing prompt.

0
ProgrammingDEV Community ·

Linux Package Management Basics: apt, dnf, yum and rpm Explained for Beginners

Linux uses package managers to install, update, and remove software, unlike Windows where users typically download executable installers manually. Tools like apt (Ubuntu/Debian), dnf (Fedora/RHEL), and yum (older RHEL/CentOS) automate software management by pulling packages from trusted distribution repositories. Each package bundles the program, required libraries, and configuration files, with the package manager resolving dependencies automatically. Common operations include updating package lists, installing or removing software, and searching for packages — all via single terminal commands. Beginners are advised to always run apt update before upgrading, use sudo appropriately, and avoid installing software from unofficial sources.

0
ProgrammingDEV Community ·

DeepSeek Leads on Price and Speed as Chinese AI APIs Face Head-to-Head Test

A software architect with a decade of production system experience conducted weeks of stress testing on four major Chinese AI APIs — DeepSeek, Qwen, Kimi, and GLM — evaluating p99 latency, failover behavior, and cost per million tokens under real workloads. DeepSeek's V4 Flash model emerged as the top price-performance pick, delivering around 60 tokens per second with stable tail latency at just $0.25 per million output tokens. Qwen, backed by Alibaba, stood out for offering the widest range of model sizes, including budget options as cheap as $0.01 per million tokens. Kimi commanded the highest prices at $3.00–$3.50 per million tokens but justified the cost with superior performance on reasoning-heavy tasks. GLM, developed by Zhipu AI, distinguished itself with the strongest Chinese-language quality and multimodal support not matched by the other three providers.

0
ProgrammingDEV Community ·

Residential Proxies Explained: Choosing the Right IP Strategy for Developers

Developers building scrapers or automation tools often face blocks and CAPTCHAs in production, making proxy selection a critical technical decision. Residential proxies use real ISP-assigned IPs, making them harder for anti-bot systems to detect compared to datacenter alternatives. Different proxy types serve distinct purposes: rotating residential IPs suit large-scale scraping, while static ISP proxies work better for stateful tasks like logins and account sessions. Providers such as Oxylabs and Bright Data cater to enterprise-scale needs, while IPRoyal, DataImpulse, and Webshare are recommended for budget or prototype use cases. Most providers offer a standard host-port endpoint with username-password authentication, allowing developers to control IP rotation or session stickiness directly through the username string.