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.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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 Mail to 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.