diff options
author | Eric Wong <e@80x24.org> | 2022-08-04 08:16:59 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2022-08-04 20:09:33 +0000 |
commit | d1366b60b275787f282dc367e9026bb4c772f161 (patch) | |
tree | 1e928376db47228404b167ef868ad15b3dc44528 | |
parent | 674b0268c057d852342347264b374ef0cd130e51 (diff) | |
download | public-inbox-d1366b60b275787f282dc367e9026bb4c772f161.tar.gz |
We can use DBI's selectcol_arrayref directly (as we do in other places) to avoid unnecessary arrays and ops on our end.
-rw-r--r-- | lib/PublicInbox/Isearch.pm | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/PublicInbox/Isearch.pm b/lib/PublicInbox/Isearch.pm index df940e76..2b45e08e 100644 --- a/lib/PublicInbox/Isearch.pm +++ b/lib/PublicInbox/Isearch.pm @@ -69,12 +69,11 @@ sub mset_to_artnums { $range = 'AND xnum >= ? AND xnum <= ?'; @r = @$r; } - my $rows = $self->{es}->over->dbh-> - selectall_arrayref(<<"", undef, $ibx_id, @$docids, @r); + return $self->{es}->over->dbh-> + selectcol_arrayref(<<"", undef, $ibx_id, @$docids, @r); SELECT xnum FROM xref3 WHERE ibx_id = ? AND docid IN ($qmarks) $range ORDER BY xnum ASC - return [ map { $_->[0] } @$rows ]; } my $rows = $self->{es}->over->dbh-> |