in reply to bind_columns OR fetchall_arrayref


1. As per DBI docs
"fetchrow_arrayref"
This is the fastest way to fetch data, particularly if used with "$sth->bind_columns"
2. When displaying a table in html
the table is not seen until the </table> tag is encountered , so break up the table
3. Use paging concept (show only few rows in one page) and give a next previous link , This can be used along with the limit option in the mysql query

Replies are listed 'Best First'.
Re^2: bind_columns OR fetchall_arrayref
by CountZero (Bishop) on Jan 04, 2005 at 06:50 UTC
    The paging concept is a good idea, but you must be careful: some modules in the Class::DBI family (such as Class::DBI::Pager) do a full SELECT of your data and then only show the requested page, so you do not save on database processing time. Use of the LIMIT-function (as exists in MySQL) would be really helpful here (as implemented in Class::DBI::Plugin::Pager). Again you must take care: if the amount of data changes between calls to display "next" and "previous" pages, the results may be not what you expect.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law