mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 16:42:05 +00:00
Add ASOF performance test with random data
This commit is contained in:
parent
aeacd42e08
commit
90fd425117
@ -26,4 +26,25 @@
|
||||
) AS ids ON (regions.RegionID = ids.RegionID) AND (regions.date < ids.EventTime)
|
||||
</query>
|
||||
|
||||
<query>
|
||||
SELECT * FROM
|
||||
(
|
||||
SELECT
|
||||
toStartOfDay(now()) + INTERVAL (seconds_since_start_of_day % 86000) SECOND AS date,
|
||||
fingerprint % 50 as fingerprint,
|
||||
multiIf(browserId % 3 == 0, 'firefox', browserId % 3 == 1, 'edge', 'chrome') as browser
|
||||
FROM generateRandom('seconds_since_start_of_day UInt32, fingerprint UInt8, browserId UInt8') LIMIT 100000
|
||||
) AS origins
|
||||
ASOF LEFT JOIN
|
||||
(
|
||||
SELECT
|
||||
toStartOfDay(now()) + INTERVAL (seconds_since_start_of_day % 86000) SECOND AS date,
|
||||
fingerprint % 50 as fingerprint,
|
||||
multiIf(language % 2 == 0, 'es', 'en') as lang
|
||||
FROM generateRandom('seconds_since_start_of_day UInt32, fingerprint UInt8, language UInt8') LIMIT 5000000
|
||||
) AS visits
|
||||
ON (visits.fingerprint = origins.fingerprint AND visits.date >= origins.date)
|
||||
FORMAT Null
|
||||
</query>
|
||||
|
||||
</test>
|
||||
|
Loading…
Reference in New Issue
Block a user