D
Size: a a a
D
RO
DC
КТ
ED
table
KB
DC
table
ED
table
ED
DC
DC
ED
SELECT source_id, get_time FROM bucket_2
:-] PREWHERE source_id=333415 AND get_time<='2020-06-26 09:00:00'
:-] order by source_id desc, get_time desc limit 1;
SELECT
source_id,
get_time
FROM bucket_2
PREWHERE (source_id = 333415) AND (get_time <= '2020-06-26 09:00:00')
ORDER BY
source_id DESC,
get_time DESC
LIMIT 1
┌─source_id─┬────────────get_time─┐
│ 333415 │ 2020-06-26 06:43:54 │
└───────────┴─────────────────────┘
1 rows in set. Elapsed: 0.498 sec. Processed 603.49 thousand rows, 4.83 MB (1.21 million rows/s., 9.69 MB/s.)
DC
DC
SELECT source_id, get_time FROM bucket_2
:-] PREWHERE source_id=333415 AND get_time<='2020-06-26 09:00:00'
:-] order by source_id desc, get_time desc limit 1;
SELECT
source_id,
get_time
FROM bucket_2
PREWHERE (source_id = 333415) AND (get_time <= '2020-06-26 09:00:00')
ORDER BY
source_id DESC,
get_time DESC
LIMIT 1
┌─source_id─┬────────────get_time─┐
│ 333415 │ 2020-06-26 06:43:54 │
└───────────┴─────────────────────┘
1 rows in set. Elapsed: 0.498 sec. Processed 603.49 thousand rows, 4.83 MB (1.21 million rows/s., 9.69 MB/s.)
ED
SELECT get_time
FROM bucket_2
PREWHERE (source_id, get_time) IN
(
SELECT
source_id,
max(get_time)
FROM bucket_2
PREWHERE (source_id = 333415) AND (get_time <= '2020-06-26 09:00:00')
GROUP BY source_id
UNION ALL
SELECT
source_id,
min(get_time)
FROM bucket_2
PREWHERE (source_id = 333415) AND (get_time > '2020-06-26 09:00:00')
GROUP BY source_id
)
┌────────────get_time─┐
│ 2020-06-26 06:43:54 │
└─────────────────────┘
1 rows in set. Elapsed: 0.050 sec. Processed 38.54 thousand rows, 308.30 KB (765.75 thousand rows/s., 6.13 MB/s.)
DC
SELECT get_time
FROM bucket_2
PREWHERE (source_id, get_time) IN
(
SELECT
source_id,
max(get_time)
FROM bucket_2
PREWHERE (source_id = 333415) AND (get_time <= '2020-06-26 09:00:00')
GROUP BY source_id
UNION ALL
SELECT
source_id,
min(get_time)
FROM bucket_2
PREWHERE (source_id = 333415) AND (get_time > '2020-06-26 09:00:00')
GROUP BY source_id
)
┌────────────get_time─┐
│ 2020-06-26 06:43:54 │
└─────────────────────┘
1 rows in set. Elapsed: 0.050 sec. Processed 38.54 thousand rows, 308.30 KB (765.75 thousand rows/s., 6.13 MB/s.)
ED
IR
DC
ED