K
Size: a a a
K
ЕО
CREATE TABLE stat_online_index (
`EventDate` Date,
`EventTime` DateTime,
`WebinarHash` String,
`ParticipantHash` String,
`ParticipantName` String DEFAULT '',
`UserId` Int32 DEFAULT CAST(-1, 'Int32'),
`OwnerId` Int32 DEFAULT CAST(-1, 'Int32'),
`PartnerId` Int32 DEFAULT CAST(0, 'Int32'),
`IsPublisher` Int8,
`Duration` Int32 DEFAULT CAST(0, 'Int32'),
`Streams` Int32 DEFAULT CAST(0, 'Int32'),
`Average` Int32 DEFAULT CAST(0, 'Int32'),
`PublishStreams` Int32 DEFAULT CAST(0, 'Int32'),
`PublishAverage` Int32 DEFAULT CAST(0, 'Int32'),
`ParticipantStatus` Int32 DEFAULT CAST(0, 'Int32'),
`ParticipantQuestionsName` Array(String),
`ParticipantQuestionsValue` Array(String),
`ParticipantQuestionsType` Array(Int8),
`ServersIp` Array(String),
`ServersStream` Array(String),
`ServersHls` Array(Int8),
`Ip` String,
`LocationId` Int32 DEFAULT CAST(0, 'Int32'),
`LocationCity` Int32 DEFAULT CAST(0, 'Int32'),
`LocationCountry` Int32 DEFAULT CAST(0, 'Int32'),
`Os` String,
`OsType` Int16,
`IsMobile` Int8,
`Browser` String,
`BrowserVersion` Int32 DEFAULT CAST(0, 'Int32'),
`Resolution` String,
`ResolutionWidth` Int16,
`ResolutionHeight` Int16
) ENGINE = ReplicatedReplacingMergeTree('/clickhouse/tables/{layer}-{shard}/stat_online_index','{replica}')
PARTITION BY toYYYYMM(EventDate)
PRIMARY KEY WebinarHash
ORDER BY WebinarHash
SETTINGS index_granularity = 8192
K
K
ЕО
ЕО
K
ЕО
ORDER BY
(
WebinarHash,
EventDate,
ParticipantHash,
EventTime
)
ЕО
K
DM
СФ
K
K
countIf(StatusRes IN (200, 500))
ЕО
СФ
DM
VZ
DM
K