How can select row in hypertable

101 views Asked by At

First I had created one table

    CREATE TABLE hypertable (a,b);
after I add 4 row into that:
    INSERT INTO hypertable VALUES ('2008-06-28 01:00:00', 'a', 'a11'),('2008-06-28 01:00:00', 'b', 'b11');
    INSERT INTO hypertable VALUES ('2008-06-28 01:00:00', 'a', 'a12'),('2008-06-28 01:00:00', 'b', 'b12');
    INSERT INTO hypertable VALUES ('2008-06-28 01:00:00', 'a', 'a13'),('2008-06-28 01:00:00', 'b', 'b13');
    INSERT INTO hypertable VALUES ('2008-06-28 01:00:00', 'a', 'a14'),('2008-06-28 01:00:00', 'b', 'b14');

Last I select all in table it will show like this:

hypertable> select * from hypertable;
2008-06-28 01:00:00     a       a14
2008-06-28 01:00:00     a       a13
2008-06-28 01:00:00     a       a12
2008-06-28 01:00:00     b       b14
2008-06-28 01:00:00     b       b13
2008-06-28 01:00:00     b       b12
hypertable>

it only show in one line for one value it can't show all value of one row in a table:( how can I select in one row it will be show all value of that row in this case I add 4 row but it show 8 line

1

There are 1 answers

0
Majoris On

Your time stamp is exactly same for all four entries you are adding for each key, '2008-06-28 01:00:00'.

So it will only save the last value added 2008-06-28 01:00:00 a a14.

In hypertable time stamp must be unique, you can time stamp as small as in nano seconds.