Re: Using DBI, better option than importing into @array
- From: Jason <jwcarlton@xxxxxxxxx>
- Date: Mon, 30 Jul 2007 23:16:41 -0000
Why join the data with |:| just to later use split on it? Unless you are
severally strapped for memory, that is probably not a good thing to do.
To be quite frank, the only reason I'm doing that is because I don't
know a better way. I know that it's sloppy, but since the
selectall_arrayref is creating a dynamically named array I couldn't
figure out how to pick out the right thing later.
LIMIT is probably what I need there, though.
As a side note, it is generally better to use placeholders than to use
dbh->quote.
I didn't realize that, I was just looking at overall character size.
I'll giving the ? a shot, though.
Is there an index on the id column of $forum_posts? If not, then MySQL has
to read through all 600,000 rows, for each of the 21 topics. I'm guessing
that this will make MySQL, not Perl, the bottleneck.
No, but I don't quite understand how I can use an index to help me on
this one. I posted that question to a MySQL ng earlier today, though;
I know it's not really appropriate for CLPM.
Thanks for the tips.
.
- References:
- Using DBI, better option than importing into @array
- From: Jason
- Re: Using DBI, better option than importing into @array
- From: xhoster
- Using DBI, better option than importing into @array
- Prev by Date: Re: Using SQLServer Stored Procedure returns Data with DBI...
- Next by Date: Re: Using DBI, better option than importing into @array
- 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
|
|