Re: Using DBI, better option than importing into @array
- From: Gunnar Hjalmarsson <noreply@xxxxxxxxx>
- Date: Tue, 31 Jul 2007 00:37:42 +0200
Jason wrote:
The most current problem is SPEED! From sheer lack of knowledge, I'm
importing the subjects table into an array in the beginning of the
script, then using a for loop throughout the program to access that
array. But the program is running pretty slow, and I'm sure that the
bottleneck is with this array.
How do you know that? Anyway, it seems to me that you can easily skip that array.
my $filelist = $dbh->selectall_arrayref("SELECT `id`, `lastmodified`,
`subject` FROM $forum_subjects ORDER BY lastmodified DESC");
for ( 0 .. 20 ) {
my $topiclist = ... id=" . $dbh->quote( $filelist->[$_][0] ) . " ...
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
.
- Follow-Ups:
- References:
- Prev by Date: Re: Using DBI, better option than importing into @array
- Next by Date: Re: Using SQLServer Stored Procedure returns Data with DBI...
- Previous by thread: Re: Using DBI, better option than importing into @array
- Next by thread: Re: Using DBI, better option than importing into @array
- Index(es):
Relevant Pages
|
|