data structure for counting frequencies in a database table-like format
Posted
by
user373312
on Stack Overflow
See other posts from Stack Overflow
or by user373312
Published on 2011-01-13T04:47:18Z
Indexed on
2011/01/13
4:54 UTC
Read the original article
Hit count: 218
i was wondering if there is a data structure optimized to count frequencies against data that is stored in a database table-like format. for example, the data comes in a (comma) delimited format below.
col1, col2, col3 x, a, green x, b, blue ... y, c, green
now i simply want to count the frequency of col1=x or col1=x and col2=green. i have been storing the data in a database table, but in my profiling and from empirical observation, database connection is the bottle-neck. i have tried using in-memory database solutions too, and that works quite well; the only problem is memory requirements and quirky init/destroy calls.
also, i work mainly with java, but have experience with .net, and was wondering if there was any api to work with "tabular" data in a linq way using java.
any help is appreciated.
© Stack Overflow or respective owner