Best of SQLApril 2025

  1. 1
    Article
    Avatar of communityCommunity Picks·1y

    Online SQL Playground for MySQL, PostgreSQL, and SQL Server

    RunSQL is an online SQL playground designed for learning, testing, and sharing SQL queries for MySQL, PostgreSQL, and SQL Server. Users can easily create and manipulate database schemas using DBML, collaborate on SQL projects, conduct interviews, and create web-based database documentation without needing local database setup. It provides a shared environment tailored for developers and data analysts.

  2. 2
    Article
    Avatar of hnHacker News·1y

    Anatomy Of A SQL Engine

    The post explores the anatomy of a SQL engine, detailing the journey of a query from parsing to result spooling. It outlines key stages such as parsing, binding, plan simplification, join exploration, and plan costing. It highlights DoltHub's approach to SQL engines using row-based execution and explores aspects of parsing, including right and left recursive methods. Further discussions include binding AST nodes, simplifying query plans, exploring join orders, and establishing optimal execution strategies. The post concludes with insights into future improvements in query execution efficiency.

  3. 3
    Article
    Avatar of devtoDEV·1y

    📍The Art of Choosing the Right Database

    Choosing the right database involves understanding the underlying storage engines and transaction protocols. This post explores the differences between SQL and NoSQL databases, focusing on B-Trees and LSM Trees. It discusses the strengths and use cases for databases like MySQL, MongoDB, Cassandra, and PostgreSQL, and highlights the importance of considering read vs. write-heavy workloads and transaction requirements.

  4. 4
    Article
    Avatar of rubylaRUBYLAND·1y

    Fix N+1 Queries Without Eager Loading Using SQL Subquery

    Learn how to address the N+1 query problem in Rails without resorting to eager loading. By leveraging SQL subqueries, you can fetch specific associated records directly within your main query, reducing memory consumption and improving performance. The post walks through a real-world example of fetching a member's latest activity timestamp efficiently, discussing various approaches and their trade-offs before demonstrating the optimal SQL subquery solution.

  5. 5
    Article
    Avatar of awegoAwesome Go·1y

    Leak and Seek: A Go Runtime Mystery

    Cyolo's R&D team tackled a significant memory leak issue in a Go application, which led to performance problems for several major customers. Initial debugging ruled out goroutine leaks, pointing instead to the SQLite3 driver. Further investigation traced the leak to the Go runtime's finalizer mechanism, which was blocked by the go-smb2 package, causing memory retention. The team's persistence and detailed analysis uncovered the root cause and led to implementing a monitoring solution to detect blocked finalizers, contributing valuable insights to the Go community.

  6. 6
    Article
    Avatar of motherduckMotherDuck·1y

    Instant SQL is here: Speedrun ad-hoc queries as you type

    Instant SQL is a new feature available in MotherDuck and DuckDB Local UI that provides real-time query result previews as you type, expediting the process of building and debugging SQL queries. This innovative tool is designed to maintain an analytical flow state, allowing for immediate visualization and modification of data which helps reduce the tedious cycle of drafting and debugging queries. Instant SQL supports various data sources and includes AI-powered inline edit suggestions for an enhanced user experience.

  7. 7
    Video
    Avatar of bytebytegoByteByteGo·1y

    System Design Was HARD - Until You Knew the Trade-Offs

    System design involves making critical trade-offs to achieve the right balance for a project's specific needs. Understanding these trade-offs in data management, like choosing between SQL and NoSQL for consistency versus scalability, or normalization versus denormalization for data integrity versus performance, is vital. The CAP theorem highlights the need to prioritize between consistency, availability, and partition tolerance in distributed systems. Ultimately, the chosen approach depends on the application's requirements and priorities.

  8. 8
    Article
    Avatar of freecodecampfreeCodeCamp·1y

    An Animated Introduction to SQL – Learn to Query Relational Databases

    Learn Structured Query Language (SQL) to query and manage relational databases through an animated, interactive tutorial. This guide covers SQL basics, core concepts, and keywords, along with practice problems using example databases. It also shows how to use SQLite in various programming languages, with a focus on practical, step-by-step examples and code playbacks to reinforce learning.

  9. 9
    Article
    Avatar of lobstersLobsters·1y

    sqlc-dev/sqlc: Generate type-safe code from SQL

    sqlc converts SQL queries into type-safe code, allowing developers to write application code with type-safe interfaces. To see sqlc in action, an interactive example and an introductory blog post are available. Additional languages can be integrated using plugins, and development is supported by sponsors.

  10. 10
    Video
    Avatar of youtubeYouTube·1y

    SQL Full Course for Beginners (30 Hours) – From Zero to Hero

    The course, led by Barzalini, covers SQL from the basics to advanced techniques including window functions, stored procedures, and database optimization. Suitable for data engineers, analysts, scientists, and students, it offers extensive materials and is entirely free. The training includes step-by-step instructions, animated visuals for complex concepts, and practical projects such as data warehousing and analytics.