Support Forum Project Downloads FAQ Documentation About Demo Tutorials Blog Plugins
November 27, 2009, 04:13:21 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: cpg1.5.2 beta released
The brand new cpg1.5.x series that comes with a lot of new features finally has reached the release stage: a first public beta release cpg1.5.2 has been released that is mainly aimed at translators, testers and community members that have contributed in the past. The beta release is not meant to be used in a production environment, but only on testbeds and for evaluation purposes. There is currently no support for cpg1.5.x yet!
[more]
   Home   Help Search Board rules Login Register  
Pages: [1]   Go Down
  Send this topic  |  Print  
Author Topic: SQL Over Quota  (Read 295 times)
0 Members and 1 Guest are viewing this topic.
corboniko Topic starter
Coppermine novice
*
Gender: Male
France France

Posts: 41


WWW
« on: November 07, 2009, 02:03:04 pm »

Bonjour,
Mon hébergeur OVH vient de ma signaler que ma base SQL vient d'atteindre les 30Mo. Je suis limité à 5mo en mutualisé, donc me voici bloqué!  Undecided

 http://www.briards-photos.fr/photos
Pour info, ma galerie avoisine les 11500 photos et 7500 commentaires. Roll Eyes

Je viens de vider la table copper_hit_stats .
Actuellement, ma base est légèrement supérieure à  5Mo.
Je vais faire évoluer mon quota chez OVH mais dans l'urgence, comment allerger la base?

La table copper_pictures est de 4,3Mo, quel est l'utilité des données dans:
- pic_raw/hdr/hit_ip???
- Puis-je vider le contenu?

Si oui, un petit exemple de requette SQL serait la bienvenue vu mon niveau.  Grin

Merci pour votre aide, Shocked
Nicolas
Logged
François Keller
Moderator
****
Gender: Male
France France

Posts: 7402


aka Frantz


WWW
« Reply #1 on: November 07, 2009, 03:31:46 pm »

il faut désactiver les logs et autres statistiques qui permettent de ne pas ajouter de volume inutile aux tables.
voici tiré de la doc de CPG1.5.x la signification des champs de la table pictures (il se peut qu'il y ait des changements mineurs dans le nombre de champs)
Quote
pid     Integer     Primary key. Used throughout Coppermine to identify this file.     
aid    Integer    Indicates which album this picture belongs to.    cpg15x_albums.aid
filepath    Text (<=255 chars)    The path on the filesystem to the directory containing the file. This is relative to Coppermine's albums directory.    
filename    Text (<=255 chars)    The name of the file on the filesystem. There should be no path components in this field.    
filesize    Integer    The size of the file in bytes.    
total_filesize    Integer    The combined size of the file plus any resized or thumbnail versions of the file in bytes. This is used in quota calculations.    
pwidth    Integer    The width of the picture in pixels. If the file is a movie this is the width it will be displayed at.    
pheight    Integer    The height of the picture in pixels. If the file is a movie this is the height it will be displayed at.    
hits    Integer    The number of times the file has been viewed.    
mtime    Datetime    The date/time of the most recent view of this file. Used to create the last viewed meta album.    
ctime    Unix timestamp    The date/time the file was added to Coppermine.

Note: Coppermine does not use this field when sorting files by date. (It uses the pid field instead).
   
owner_id    Integer    The user who uploaded this file. 0 for anonymous users.    cpg15x_users.user_id
pic_rating    Integer    The value represents the current average rating of the file. This allows Coppermine to track the average rating without having to store all ratings ever made. Divide this number by 2000 to get a rating out of 5. See ratepic.php for how the value is calculated.    
votes    Integer    The total number of votes/ratings made on the file.    
title    Text (<=255 chars)    The short title of the file.    
caption    Text (<=65k chars)    The longer description of the file.    
keywords    Text (<=255 chars)    Used to tag the file with a given word or phrase. Used in searching, 'clickable keywords', and for the 'linked files' feature. The keyword separator is a configuration setting.    
approved    YES / NO    Whether the file has been approved by the administrator. Files that are not approved are not displayed to regular users. If approval is not enabled then the file gets a value of YES automatically.    
galleryicon    Integer    Indicates that this file has been selected as the thumbnail for a user gallery.    cpg15x_pictures.pid
user{1,2,3,4}    Text (<=255 chars)    Custom fields for image description.    
url_prefix    Integer    Designed as a way to allow some files to be stored in an alternate location to the albums directory, but this feature is not used by Coppermine itself. See the function get_pic_url() in include/functions.inc.php. Should normally be set to 0.    
pic_raw_ip    Text (<=255 chars)    The IP of the uploader. This IP is derived from the REMOTE_ADDR variable. If the webserver is behind a proxy this will probably be the IP of the proxy.    
pic_hdr_ip    Text (<=255 chars)    The IP of the uploader. This IP is derived from the HTTP_CLIENT_IP or HTTP_X_FORWARDED_FOR variables. If the webserver is behind a proxy this should be the actual client IP instead of the proxy's IP. If neither variable is present this will be the same as the pic_raw_ip value.    
lasthit_ip    Text (<=255 chars)    The IP address of the last visitor to view the file. This IP is derived from the REMOTE_ADDR variable. If the webserver is behind a proxy this will probably be the IP of the proxy.    
position    Integer    The position of the file within the album. This is only taken into account if the default sort order is set to position ascending or descending in config. The positions are set using the 'sort my pictures' page.
Il me semble avoir vu aussi des posts en anglais sur les tables qui prenaient vite de l'ampleur
Les commentaires peuvent aussi prendre de la place, ainsi que les ecartes
Logged

Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog
corboniko Topic starter
Coppermine novice
*
Gender: Male
France France

Posts: 41


WWW
« Reply #2 on: November 07, 2009, 08:17:33 pm »

Merci pour ces infos.
Je viens de contrôler que mes 7300 commentaires prennent 960Ko et 3,6Mo pour la table copper_pictures pour 11500 photos.
J'ai vidé la table copper_hit_stats qui avait atteint 25Mo.

Nicolas
www.briards-photos.fr
Logged
François Keller
Moderator
****
Gender: Male
France France

Posts: 7402


aka Frantz


WWW
« Reply #3 on: November 07, 2009, 10:36:30 pm »

pour les galeries avec beaucoup de visiteurs et d'images, (ainsi que de commentaires), il est souvent judicieux de ne pas activer les stats
Logged

Avez vous lu la DOC ? la FAQ ? et cherché sur le forum avant de poster ?
Did you read the DOC ? the FAQ ? and search the board before posting ?
Mon Blog
Pages: [1]   Go Up
  Send this topic  |  Print  
 
Jump to:  

Powered by SMF 1.1.10 | SMF © 2006-2009, Simple Machines LLC
Page created in 0.065 seconds with 18 queries.