Re: Having a code ref executed when result set is all fetched

2012-03-30 Thread Tim Bunce
On Tue, Mar 27, 2012 at 04:17:22PM +0200, Elizabeth Mattijsen wrote: > >> Becomes: > >> = > >> my %visitors; > >> my $values; > >> while ( $sth= $sth->next ) { > >>$visitors{ $values->[0] }= undef > >> while $values= $sth->fetchrow_arrayref; > >> } > >> printf "

Re: Having a code ref executed when result set is all fetched

2012-03-27 Thread Elizabeth Mattijsen
How time flies when you're having some days off... On Mar 15, 2012, at 1:35 PM, Tim Bunce wrote: > On Wed, Mar 14, 2012 at 01:35:21PM +0100, Elizabeth Mattijsen wrote: >> Maybe some background first: >> >> I'm working on code that does queries on large tables. To be able to >> support the growt

Re: Having a code ref executed when result set is all fetched

2012-03-15 Thread Tim Bunce
On Wed, Mar 14, 2012 at 01:35:21PM +0100, Elizabeth Mattijsen wrote: > Maybe some background first: > > I'm working on code that does queries on large tables. To be able to support > the growth of these tables, we need to shard the tables to multiple database > servers. One way to shard this

Re: Having a code ref executed when result set is all fetched

2012-03-14 Thread Elizabeth Mattijsen
On Mar 14, 2012, at 1:35 PM, Elizabeth Mattijsen wrote: > Maybe some background first: > > I'm working on code that does queries on large tables. To be able to support > the growth of these tables, we need to shard the tables to multiple database > servers. One way to shard this evenly, would