Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I'm writing my own Group by operator (non-hashed implementation) and I'm currently looking on a good data structure to store the result groups. There are two requirement in my mind: the table need to be efficiently expanded and the tuples within each group need to be sorted.

I carefully examined the implementation of standard Group by (both hashed and sorted implementation), the closest I got is to leverage parts of the TupleHashTable but before going through this plan, I need to make sure I'm not overlooking an existing data structure.

share|improve this question

migrated from stackoverflow.com Mar 20 '13 at 12:21

This question came from our site for professional and enthusiast programmers.

What language are you writing this in? C? –  Chris Travers Mar 21 '13 at 4:25
Yes, I'm using C. I'm implementing my operator inside postgres. –  Luma Mar 24 '13 at 17:10
Sounds like a candidate for postgresql.org/list/pgsql-general. Mail to pgsql-general@postgresql.org. Would be nice to report back here, it that leads to a useful answer. –  Erwin Brandstetter Mar 24 '13 at 23:43

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.