select count() FROM Event SAMPLE 0.1 WHERE (eventDate BETWEEN '2018-09-18' AND '2018-09-25')
SELECT count()
FROM Event
SAMPLE 1 / 10
WHERE (eventDate >= '2018-09-18') AND (eventDate <= '2018-09-25')
┌──count()─┐
│ 30478197 │
└──────────┘
1 rows in set. Elapsed: 1.913 sec. Processed 108.83 million rows, 5.11 GB (56.90 million rows/s., 2.67 GB/s.)
🙂 select count() FROM Event WHERE (eventDate BETWEEN '2018-09-18' AND '2018-09-25')
SELECT count()
FROM Event
WHERE (eventDate >= '2018-09-18') AND (eventDate <= '2018-09-25')
┌───count()─┐
│ 304903885 │
└───────────┘
1 rows in set. Elapsed: 0.241 sec. Processed 304.91 million rows, 609.82 MB (1.26 billion rows/s., 2.53 GB/s.)
Потому что еще читается колонка для семплирования
Обсуждают сегодня