project-cdsware-users@cern.ch archives


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'People who viewed this page also viewed:' awfully slow in my site


  • From: Tibor Simko <tibor.simko@xxxxxxx>
  • Subject: Re: 'People who viewed this page also viewed:' awfully slow in my site
  • Date: Fri, 09 Feb 2007 12:06:08 +0100

Hello Ferran:

On Fri, 09 Feb 2007, Ferran Jorba wrote:

>>    mysql> SHOW TABLE STATUS LIKE 'rnkPAGEVIEWS';
>
>  Name		 rnkPAGEVIEWS
>  Engine		 MyISAM
>  Version	 7
>  Row_format	 Fixed
>  Rows		 1485362
>  Avg_row_length	 20
>  Data_length	 29707240
>  Max_data_length 85899345919
>  Index_length	 39614464
>  Data_free	 0
>  Auto_increment	 NULL
>  Create_time	 2007-01-22
>  Update_time	 11:55:32
>  Check_time	 2007-02-08
>  Collation	 16:28:21
>  Checksum	 NULL
>  Create_options	 latin1_swedish_ci
>  Comment	 NULL
>
>>    mysql> SELECT COUNT(DISTINCT(id_bibrec)) FROM rnkPAGEVIEWS;
>
>  COUNT(DISTINCT(id_bibrec))	14039
>
>>    mysql> SELECT COUNT(DISTINCT(id_user)) FROM rnkPAGEVIEWS;
>
>  COUNT(DISTINCT(id_user))	1431083
>
>>    mysql> SELECT COUNT(DISTINCT(client_host)) FROM rnkPAGEVIEWS;
>
>  COUNT(DISTINCT(client_host))	21209

Okay, thanks.  The numbers look reasonable and 4-6 seconds is
certainly too much for them.  I'll try to optimize the process.

One more thing in the meantime: have you optimized your my.cnf setup
in some way for the amount of memory you've got?  E.g. what is your
key buffer size?

    mysql> SHOW VARIABLES LIKE 'key_buffer_size';

Best regards
--
Tibor Simko ** CERN IT-UDS ** Bldg 31-S-014 ** Voice: +41-22-7673527
CERN Document Server ** <http://cds.cern.ch/> ** <cds.support@xxxxxxx>