Re: Using DBI, better option than importing into @array
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
.
Relevant Pages
- Re: Logon script - function array and select case not working
... this all works well, except, the function i am using for the rules in the control script causes alot of querrys to AD. as there are alot of groups. ... objTSout.writeline retrv ... So if you think that this will assign an array value to the variable, how do you think the case select statement is going go compare this array value with the literal string values such as "group name here"? ... However, by not assigning ANY value to checkgrp in the function, you are guaranteeing that, should the function ever exit, it will return no information. ... (microsoft.public.scripting.vbscript) - Re: trouble backup with perl.
... >> I'm experiencing to write a perl script for to make backup with afio ... This is a very inefficient loop, ... > whole file to an array and then loop over the array. ... >> Pleeese help I need backup. ... (perl.beginners) - Re: Scalable method for searching in relatively big files
... directly in the file A each line for the while loop, ... it would interfer with the search if I used the array @a for the while ... So it isn't a scalable solution in my opinion. ... Show us your script, and someone here will be able to help. ... (comp.lang.perl.misc) - Re: string retrieval issue
... Chicago Bears|NFC North ... not writing the third element back to the array). ... You didn't include it in your script. ... Fear is the mind-killer. ... (comp.lang.perl.misc) - Re: even rows for checkbox forms with no splitting of boxes from values
... 'mod' on the array length with a denominator equal to the width of the row, ... State saving really depends on what the script is already doing. ... So I usually roll my own checkboxes. ... #this is to create an array with 25-50 strings 2-10 in length ... (comp.infosystems.www.authoring.cgi) |
|