[Dbix-class] Index
Will Smith
willbelair at yahoo.com
Fri Feb 8 19:10:55 GMT 2008
How do I index the search that returns more than a thousand records with several parameters? My server runs pretty slow on a search like that.
In the DBIx::Class::ResultSet, I found there is way to do indexing, but it's not very clear, so, would someone please help me out. I'm using MySQL database. The base class of the table is:
----------------------------------------------
package myDB::HTMLLinks;
use base qw/DBIx::Class/;
# Load required DBIC stuff
__PACKAGE__->load_components(qw/PK::Auto Core/);
# Set the table name
__PACKAGE__->table('htmllinks');
# Set columns in table
__PACKAGE__->add_columns(qw/
id
link
activel
/);
# Set the primary key for the table
__PACKAGE__->set_primary_key(qw/id/);
--------------------------------
What do I need to add in this class, and in the controller that calls the search?
Thank you.
---------------------------------
Looking for last minute shopping deals? Find them fast with Yahoo! Search.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080208/36af0b03/attachment.htm
More information about the DBIx-Class
mailing list