- Популярные видео
- Авто
- Видео-блоги
- ДТП, аварии
- Для маленьких
- Еда, напитки
- Животные
- Закон и право
- Знаменитости
- Игры
- Искусство
- Комедии
- Красота, мода
- Кулинария, рецепты
- Люди
- Мото
- Музыка
- Мультфильмы
- Наука, технологии
- Новости
- Образование
- Политика
- Праздники
- Приколы
- Природа
- Происшествия
- Путешествия
- Развлечения
- Ржач
- Семья
- Сериалы
- Спорт
- Стиль жизни
- ТВ передачи
- Танцы
- Технологии
- Товары
- Ужасы
- Фильмы
- Шоу-бизнес
- Юмор
most common interview question #tech #systemdesign #backend #gratitude #fyp #shortvideo #ytshorts
Trick questions asked by Interviewers.. here is the explaination
1️⃣Both count rows, not values
COUNT(*) counts every row.
COUNT(1) evaluates the constant 1 for every row.
In both cases, the database still counts rows.
2️⃣The optimizer treats them identically
Query optimizers rewrite COUNT(1) into COUNT(*).
Execution plans are the same.
Reality: No performance difference.
3️⃣No NULL checks in either case
1 is never NULL, so COUNT(1) does not filter anything. Same behavior as COUNT(*).
4️⃣Index and storage access are identical
Both queries scan the same data or index pages. No extra I/O, no extra CPU.
Applies to: MySQL, PostgreSQL, Oracle, SQL Server
5️⃣ The "COUNT(1) is faster" myth is outdated This came from very old database engines.
Modern engines fully optimize both.
👉Final Verdict (INTERVIEW SAFE ANSWER)
Neither is faster
Both compile to the same execution plan
Use COUNT(*) for clarity and intent.
[COUNT star vs COUNT 1, SQL interview questions, database performance myths, SQL optimization explained, backend engineering concepts, MySQL Postgres internal]
Save this for interviews
#techdevelopers #devlife #fullstackdev #codingrules #codingblog #codingsecrets #codingsuccess #dailydev
Share with a frontend or backend dev Follow for system design & full-stack fundamentals
#codinginterview #cleancoder #technicalinterview #codebuild #techinterviews #techinterview #keepcoding #codecareer #codementor #coderush
[software, coder, developer, frontend developer, backend engineering, system design, interview prep, software engineer, computer networks, computer science, cs students, programming, coding, web development, internet basics, tech reels, learn in public, FAANG, google, hiring, interviews, tips]
Видео most common interview question #tech #systemdesign #backend #gratitude #fyp #shortvideo #ytshorts канала TechKiKahani
1️⃣Both count rows, not values
COUNT(*) counts every row.
COUNT(1) evaluates the constant 1 for every row.
In both cases, the database still counts rows.
2️⃣The optimizer treats them identically
Query optimizers rewrite COUNT(1) into COUNT(*).
Execution plans are the same.
Reality: No performance difference.
3️⃣No NULL checks in either case
1 is never NULL, so COUNT(1) does not filter anything. Same behavior as COUNT(*).
4️⃣Index and storage access are identical
Both queries scan the same data or index pages. No extra I/O, no extra CPU.
Applies to: MySQL, PostgreSQL, Oracle, SQL Server
5️⃣ The "COUNT(1) is faster" myth is outdated This came from very old database engines.
Modern engines fully optimize both.
👉Final Verdict (INTERVIEW SAFE ANSWER)
Neither is faster
Both compile to the same execution plan
Use COUNT(*) for clarity and intent.
[COUNT star vs COUNT 1, SQL interview questions, database performance myths, SQL optimization explained, backend engineering concepts, MySQL Postgres internal]
Save this for interviews
#techdevelopers #devlife #fullstackdev #codingrules #codingblog #codingsecrets #codingsuccess #dailydev
Share with a frontend or backend dev Follow for system design & full-stack fundamentals
#codinginterview #cleancoder #technicalinterview #codebuild #techinterviews #techinterview #keepcoding #codecareer #codementor #coderush
[software, coder, developer, frontend developer, backend engineering, system design, interview prep, software engineer, computer networks, computer science, cs students, programming, coding, web development, internet basics, tech reels, learn in public, FAANG, google, hiring, interviews, tips]
Видео most common interview question #tech #systemdesign #backend #gratitude #fyp #shortvideo #ytshorts канала TechKiKahani
Комментарии отсутствуют
Информация о видео
14 апреля 2026 г. 6:38:51
00:00:07
Другие видео канала





















