Skip to content
Tagged articles

SQL tips

3 articles · Page 1 of 1
Code Farmer Manor Chronicle
Code Farmer Manor Chronicle
Sep 20, 2026 · Databases

One SQL to Generate 2000 Test Rows: Stop Hand-Writing VALUES

Learn how to generate 2000 test rows in PostgreSQL using a single INSERT...SELECT with generate_series, deriving column values via series numbers, zero-padding with LPAD, explicit timestamps, and ON CONFLICT for idempotent execution, plus random data variations and MySQL equivalents.

INSERT SELECTKingBaseESLPAD
0 likes · 8 min read
One SQL to Generate 2000 Test Rows: Stop Hand-Writing VALUES
liandk
liandk
Aug 14, 2026 · Databases

Safe SQL UPDATE Practices: Changing Phone Numbers, Statuses, and Prices Without Risk

This article explains how the SQL UPDATE statement modifies existing rows, emphasizes the necessity of a WHERE clause to avoid full‑table changes, provides single‑row, batch, and multi‑column examples, and advises verifying data with SELECT before executing updates in production.

Data ModificationSQLSQL tips
0 likes · 2 min read
Safe SQL UPDATE Practices: Changing Phone Numbers, Statuses, and Prices Without Risk
21CTO
21CTO
Jun 5, 2019 · Databases

12 Proven SQL Tricks to Supercharge Your Database Performance

This article presents twelve practical SQL optimization techniques—from using proper comparison operators and LIMIT clauses to indexing strategies and query consistency—to dramatically improve database query speed and overall application performance.

Performance TuningQuery PlanningSQL
0 likes · 5 min read
12 Proven SQL Tricks to Supercharge Your Database Performance