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 Found %d unique visitors\n,

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

more_results was Having a code ref executed when result set is all fetched

2012-03-15 Thread Martin J. Evans
On 15/03/12 12:35, Tim Bunce wrote: There's actually an (almost completely undocumented) more_results() method that's meant for that kind of thing. I was rather surprised to find it wasn't documented as I'm pretty sure we thrashed out the semantics some time ago. [later] Wow, some time ago was

Having a code ref executed when result set is all fetched

2012-03-14 Thread Elizabeth Mattijsen
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 be to shard per second of data: even seconds go to one database,

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 be