Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE metricresultindexed4(metric text, timeunit text, periodenddtm timestamp, periodlabel text, tagsstr text, tags set<text>, value double, status text, message text, PRIMARY KEY((metric,timeunit), periodenddtm, tagsstr));
- CREATE INDEX metricresultindexedtags4 ON testresult.metricresultindexed4 (tags);
- INSERT INTO testresult.metricresultindexed4(metric,timeunit,periodenddtm,periodlabel, tagsstr, tags, value, status, message) VALUES('Sales', 'Month', 1357064999000, 'Jan-10', 'U.S.A|Pen', {'U.S.A', 'Pencil'}, 50, 'success', 'success');
- select * from metricresultindexed4 where metric='Sales' AND timeunit='Month' AND periodenddtm=1362076199000 AND tags CONTAINS 'U.S.A';
- /* Getting 0 rows here */
- INSERT INTO testresult.metricresultindexed4(metric,timeunit,periodenddtm,periodlabel, tagsstr, value, status, message) VALUES('Sales', 'Month', 1357064999000, 'Jan-10', 'U.S.A|Pen', 60, 'success', 'success');
- UPDATE testresult.metricresultindexed4 SET tags={'U.S.A', 'Pen'} where metric='Sales' AND timeunit='Month' AND periodenddtm=1362076199000 AND tagsstr='U.S.A|Pen';
- select * from metricresultindexed4 where metric='Sales' AND timeunit='Month' AND periodenddtm=1362076199000 AND tags CONTAINS 'U.S.A';
- /* Getting 0 rows here */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement