Re: [PERFORM] Highly Efficient Custom Sorting

2010-07-03 Thread Alvaro Herrera
Excerpts from Merlin Moncure's message of sáb jul 03 18:53:46 -0400 2010: > What about my suggestion doesn't work for your requirements? (btw, > let me disagree with my peers and state pl/perl is lousy for this type > of job, only sql/and pl/sql can interact with postgresql variables > natively f

Re: [PERFORM] Highly Efficient Custom Sorting

2010-07-03 Thread Merlin Moncure
On Sat, Jul 3, 2010 at 4:17 PM, Eliot Gable wrote: > Read RFC 2782 on random weighted load balancing of SRV records inside DNS. > That algorithm is what I need implemented, but with an extension. I have > groups of records I need to have the algorithm applied to where each group > is treated separ

Re: [PERFORM] Highly Efficient Custom Sorting

2010-07-03 Thread Eliot Gable
Read RFC 2782 on random weighted load balancing of SRV records inside DNS. That algorithm is what I need implemented, but with an extension. I have groups of records I need to have the algorithm applied to where each group is treated separately from the others. I understand the operational complexi

Re: [PERFORM] Highly Efficient Custom Sorting

2010-07-03 Thread Merlin Moncure
On Fri, Jul 2, 2010 at 11:17 PM, Eliot Gable wrote: > Well, I re-wrote the algorithm in Perl. However, it did not solve the speed > issue. Running time now is a whopping 240+ ms instead of the 31.8ms I was > getting before (15.2 of which is sorting). Here is the Perl code on the > sorting. I won't