bitset counting as a user defined function in postgresql 9.2?

From: Kanarupan Kularatnarajah <kanarupanxiii(at)gmail(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: bitset counting as a user defined function in postgresql 9.2?
Date: 2013-08-25 02:06:12
Message-ID: CAFf4ZT2Pf88jqDPSbSrLtXZg6Jc0RzOycFL0eoFhRB9cOAz+9A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

As an initial attempt to try hands-on with postgresql, I've learned on user
created functions and some other internals of postgresql.

Few materials on postgresql indicate that the aggregate functions are slow
due to some internal reasons (index covering, null etc).

I'm looking forward to implement my own bit counting or counting mechanism
(I've gone through some bit twiddling as well) via user defined functions
(in C) and in cases I may need to create user defined data types as well.

Are there any possible scenarios where user defined count would perform
better than the underlying implementation? Is it worth a try?

And are there any better ways to evaluate, compare both? (other than
EXPLAIN ANALYZIS)

Please guide.

--
Regards,
K.Kanarupan
Undergraduate,
Dept. of Computer Science & Engineering
University of Moratuwa

Mobile: +94 777 420 179

Browse pgsql-hackers by date

  From Date Subject
Next Message Kanarupan Kularatnarajah 2013-08-25 02:24:16 What is the algorithm used for counting the set bit (number of ones) of a bitmap/bitarray/betset in postgresql?
Previous Message Daniel Farina 2013-08-25 01:08:14 Re: Unpacking scalar JSON values