[Dbix-class] Index

Will Smith willbelair at yahoo.com
Fri Feb 8 19:15:10 GMT 2008


First, I might have sent the email to the wrong group, so, if this is a double, please ignore. Thank you.
 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.
       
---------------------------------
Never miss a thing.   Make Yahoo your homepage.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20080208/71cbafc1/attachment-0001.htm


More information about the DBIx-Class mailing list