From 45beed029c3b779a5fcec1d0460c57655f3c9b95 Mon Sep 17 00:00:00 2001 From: miker Date: Thu, 3 Mar 2005 18:49:19 +0000 Subject: [PATCH] faster version of nodeset.retrieve git-svn-id: svn://svn.open-ils.org/ILS/trunk@205 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../Application/Storage/Publisher/biblio.pm | 32 +++++++++++++++---- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm index 49ee1146e9..1f8e8cf448 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Storage/Publisher/biblio.pm @@ -239,16 +239,34 @@ sub get_record_nodeset { my $client = shift; my @ids = @_; + my $table = biblio::record_node->table; + + my $sth = biblio::record_node->db_Main->prepare_cached(<<" SQL"); + SELECT * FROM $table WHERE owner_doc = ? ORDER BY intra_doc_id; + SQL + + for my $id ( @ids ) { next unless ($id); - $client->respond( - $self->_cdbi_list2AoH( - biblio::record_node->search( - owner_doc => "$id", { order_by => 'intra_doc_id' } - ) - ) - ); + $sth->execute($id); + + my @rows; + + while (my $hr = $sth->fetchrow_hashref) { + push @rows, $hr; + } + $client->respond( \@rows ); + + $sth->finish; + +# $client->respond( +# $self->_cdbi_list2AoH( +# biblio::record_node->search( +# owner_doc => "$id", { order_by => 'intra_doc_id' } +# ) +# ) +# ); last if ($self->api_name !~ /list/o); } -- 2.43.2