Tagged articles
DISTINCT
13 articles · Page 1 of 1
This article demonstrates three SQL techniques—DISTINCT, GROUP BY, and the ROW_NUMBER window function—for deduplicating records and counting unique tasks, comparing their syntax, performance, and behavior across MySQL, Hive, and Oracle environments.
DISTINCTHiveOracle
0 likes · 5 min read

This article compares MySQL's DISTINCT and GROUP BY clauses, detailing when they deliver identical performance with indexed columns, why DISTINCT can be faster without indexes, how each handles NULLs and multi‑column deduplication, and provides practical syntax examples and optimization guidance.
DISTINCTIndex OptimizationMySQL
0 likes · 10 min read

Both DISTINCT and GROUP BY can use indexes when available, giving similar performance, but without indexes DISTINCT is usually faster because GROUP BY may invoke implicit sorting; MySQL 8.0 removed this sorting, making their performance nearly equal, and GROUP BY offers clearer semantics and more flexibility for complex queries.
DISTINCTIndex OptimizationMySQL
0 likes · 9 min read

This article explains how to obtain distinct code entries together with their cdate and ctotal fields in MySQL, covering the use of DISTINCT, GROUP BY, handling ONLY_FULL_GROUP_BY mode, and alternative solutions such as GROUP_CONCAT with DISTINCT.
DISTINCTMySQLONLY_FULL_GROUP_BY
0 likes · 6 min read

This article compares MySQL's DISTINCT and GROUP BY clauses, explaining how index availability, implicit sorting, and MySQL version differences affect their execution speed, and provides practical guidance on choosing the right clause for optimal query performance.
DISTINCTIndexMySQL
0 likes · 10 min read

This article explains the differences between DISTINCT and GROUP BY in MySQL, showing that with an index they have similar efficiency, while without an index DISTINCT is usually faster because GROUP BY may trigger sorting and temporary tables, and it provides syntax, examples, and recommendations.
DISTINCTIndexMySQL
0 likes · 8 min read

This article explains how DISTINCT and GROUP BY differ in MySQL, comparing their index usage, execution speed with and without indexes, the impact of implicit sorting in older versions, and why GROUP BY is often preferred for clearer semantics and advanced aggregations.
DISTINCTMySQLSQL Performance
0 likes · 10 min read

This article explains the functional differences between DISTINCT and GROUP BY in MySQL, analyzes their performance with and without indexes, describes how implicit sorting affects GROUP BY before MySQL 8.0, and provides practical recommendations for choosing the appropriate clause.
DISTINCTMySQLSQL
0 likes · 9 min read

This guide explains three SQL techniques—DISTINCT, GROUP BY, and the ROW_NUMBER window function—for deduplicating records, compares their behavior and performance, and provides concrete query examples with a sample task table and additional test cases.
DISTINCTROW_NUMBERSQL
0 likes · 5 min read

This article explains three common SQL deduplication techniques—using DISTINCT, GROUP BY, and the ROW_NUMBER window function—illustrating their syntax, performance considerations, and example queries for counting unique task identifiers in relational databases.
DISTINCTROW_NUMBERSQL
0 likes · 4 min read

This article explains how to remove duplicate rows in SQL by using DISTINCT, GROUP BY, and the ROW_NUMBER window function, compares their syntax and performance, and provides concrete examples with a Task table and a Test helper table.
DISTINCTROW_NUMBERSQL
0 likes · 4 min read


ITPUBJun 14, 2016 · Databases
This guide explains how to locate rows with identical values across one or several columns using self‑joins, GROUP BY, DISTINCT, and rowid, and provides step‑by‑step SQL statements to safely delete the extra duplicate entries from a table.
DELETEDISTINCTSQL
0 likes · 7 min read

Distinct in MySQL works like GROUP BY but returns only one row per group; it can use index scans like GROUP BY, falls back to a temporary table when indexes aren't sufficient, and unlike GROUP BY it avoids sorting, making index optimization crucial for large result sets.
DISTINCTIndex OptimizationMySQL
0 likes · 2 min read
