I have 10,000 long string with 1s and 0s. As I know Int does not support
that long numbers. Any ideas how I can do it? Actually I want to make
bitwise and, then count number of 1s and divide by length, in this case by
10,000
On Thu, Mar 10, 2016 at 10:29 PM, Sjoerd Mullender
Text is about the worst type you could have chosen. Far better is to choose one of the integer types: tinyint, smallint, integer, bigint, depending on the maximum number of bits that you have. If you have a CSV file and the column contains just sequences of 0 and 1, you will need to convert those number to e.g. hexadecimal notation (i.e. something like 0x42ab). Once you have loaded the data as integers, you can use the bitwise operators. & is bitwise AND, | is bitwise OR.
On 03/10/2016 10:01 PM, Shmagi Kavtaradze wrote:
I am new to Monetdb. I am using Postgresql mainly, but want to check Monetdb performace. In Postres I have column of type bit() filled with 0s and 1s. Then I am comparing each row to all other rows with bitwise AND on that column. Monetdb does not have bit() type so I used text. Any ideas how to do bitwise AND in monetdb and what type of column should I use for this? The query I tried:
select a.sentenecid, b.sentenecid, a.sentence AND b.sentence from test a, test b;
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list
-- Sjoerd Mullender
_______________________________________________ users-list mailing list users-list@monetdb.org https://www.monetdb.org/mailman/listinfo/users-list