Re: Using DBI, better option than importing into @array



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.

.



Relevant Pages

  • Re: MySQL crashes on amd64
    ... >>1) Exchanging memory on the machine did not work. ... This is obviously not a hardware issue. ... The errors are reproducable for MySQL 4.1.15 and MySQL 5.0.15 so ... It is possible that mysqld could use up to ...
    (freebsd-current)
  • Re: MySQL crashes on amd64
    ... >>1) Exchanging memory on the machine did not work. ... This is obviously not a hardware issue. ... The errors are reproducable for MySQL 4.1.15 and MySQL 5.0.15 so ... It is possible that mysqld could use up to ...
    (freebsd-questions)
  • Re: MySQL/PHP: Check data length before INSERT?
    ... >> MySQL should cut it for you, if it is too long to fit, but of course ... >> never know if there is a bug in MySQL. ... buffer overrun is where you allocate a block of memory of fixed size, ... in PHP, this is not anything that you as a user of PHP need to be concerned ...
    (comp.lang.php)
  • Re: KDE 4.2 requires local MySQL Server
    ... If every applications starts its own copy of mysql, ... for example, GDBM, Berkeley DB and SQLite. ... I've read the reason ... One single MySQL instance as central storage for all applications ...
    (Fedora)
  • Re: Page Cache writeback too slow, SSD/noop scheduler/ext2
    ... When memory gets low this will result in very irregular performance drops. ... These are single purpose machines running MySQL. ... The wk_update function does not write enough dirty pages, ...
    (Linux-Kernel)