Best of SQL — March 2024
- 1
- 2
Community Picks·2y
10 Cool SQL Optimisations That do not Depend on the Cost Model
The post evaluates 10 SQL optimizations that do not depend on the cost model. It discusses the applications and support for transitive closure, removing 'silly' predicates, JOIN elimination, provably empty sets, and more.
- 3
- 4
Theo - t3․gg·2yI Suck At SQL, Now My DB Tells Me How To Fix It
Planet Scale introduces schema recommendations, a new feature that helps improve database performance by providing tailored recommendations based on production database traffic. The recommendations include adding indexes for inefficient queries, removing redundant indexes, preventing primary key ID exhaustion, and dropping unused tables.
- 5
- 6
Laravel News·2y
Easily create complex database queries with the Query Enrich Package
Laravel Query Enrich simplifies the creation of complex database queries in Laravel. It provides examples of fetching orders placed in the last 7 days, using the avg function for grabbing average monthly prices for oil and gas, using exists queries, and getting a full name using concatws. The complete documentation and Github repository for the Query Enrich Package can be found.
- 7
- 8
Vlad Mihalcea·2y
PostgreSQL Index Types
This post explores PostgreSQL index types, including B+Tree, Hash, and GIN indexes. It discusses the benefits of using B+Tree indexes for filtering, range scans, and sorting. It explains how Hash indexes are useful for equality checks and saving space. It also explains how GIN indexes can speed up JSON-specific operations. The post concludes by mentioning other index types available in PostgreSQL.
- 9
Community Picks·2y
Prisma in 100 Seconds
Prisma is an open source tool that provides a modern and safe way to work with databases. It allows you to write a schema to express your data and relationships, performs typesafe CRUD operations, handles migrations, and offers a convenient way to view and manage your data in the browser.
- 10
AWS in Plain English·2y
Understanding Database Indexing
Database indexing is used to facilitate faster data retrieval by creating a separate data structure that contains pointers or references to the actual data in a table. Indexing helps optimize disk operations and improve search performance in databases. There are different types of indexing, such as B-tree indexing and LSM tree indexing. The sequence of columns in a composite index is important for efficient searching. Certain considerations should be made when using indexes in queries.
- 11
gitconnected·2y
SQL Series: Preparing a Database Step by Step
This post discusses the process of preparing a database step by step for SQL learning, using a dataset related to sanitary inspections on cruise ships. It provides an overview of the dataset, instructions for creating a schema in MySQL Workbench, and guidance on loading data into the database.
- 12
KDnuggets·2y
Collection of Guides on Mastering SQL, Python, Data Cleaning, Data Wrangling, and Exploratory Data Analysis
Collection of guides for mastering SQL, Python, data cleaning, data wrangling, and exploratory data analysis. Start with SQL, then move on to Python and essential techniques like data cleaning. Gain expertise in data wrangling and master exploratory data analysis to uncover insights.
- 13
- 14
Supabase·2y
PostgREST Aggregate Functions
PostgREST v12 has released aggregate functions, which allow users to summarize data by performing calculations across groups of rows. These functions can be used directly through the PostgREST API, making data manipulation easier. Users can also use aggregate functions in conjunction with embedded resources to perform complex calculations. However, it is important to use aggregate functions safely to prevent potential performance issues.
- 15
The New Stack·2y
How to Write SQL Queries
SQL is a declarative language used for querying, analyzing, and manipulating data. It uses different elements like SELECT, FROM, JOIN, WHERE, GROUP BY, HAVING, ORDER BY, OFFSET, and FETCH to retrieve and analyze data. SQL queries can be used to join tables, filter rows, aggregate data, and sort results. The GROUP BY clause is used to group rows with common values and the HAVING clause is used to filter the grouped rows based on a condition.
- 16
Hacker News·2y
incentius-foss/WhatTheDuck: WhatTheDuck is an open-source web application built on DuckDB. It allows users to upload CSV files, store them in tables, and perform SQL queries on the data.
WhatTheDuck is an open-source web application built on DuckDB. It allows users to upload CSV files, store them in tables, and perform SQL queries on the data.
