Database Size information
 
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_sitestats
View previous topic :: View next topic  
Author Message
jdivision
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 16
Location: Portugal

PostPosted: Tue Jan 18, 2005 5:22 pm    Post subject: Database Size information Reply with quote

I have erroneous information on the Database Size field, on the Mx-Sitestats module.

My phpBB dabase have 10 MB, and the information on MX-Sitestats is 3,48 MB.

Did I make something wrong?

Tanks in advance…

 
 
_________________
Apologies for the bad English...
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Tue Jan 18, 2005 6:29 pm    Post subject: Re: Database Size information Reply with quote

Actually, I just used the same code used in the phpBB ACP.

Do you see any difference between the phpBB ACP reported value and the one displayed by mx_sitestats?

Anyway, it might be something to consider for a future version of this module to see how other MySQL packages compute the DB size, ie: phpMyAdmin, etc.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
jdivision
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 16
Location: Portugal

PostPosted: Tue Jan 18, 2005 7:09 pm    Post subject: Re: Database Size information Reply with quote

markus_petrux wrote:
Actually, I just used the same code used in the phpBB ACP.

Do you see any difference between the phpBB ACP reported value and the one displayed by mx_sitestats?


You are right, the phpBB ACP give the same value and I didn’t notice that before Shocked

That’s so strange… Rolling Eyes

 
 
_________________
Apologies for the bad English...
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Tue Jan 18, 2005 8:20 pm    Post subject: Re: Database Size information Reply with quote

Probably, the reason is it only takes into account the tables with phpBB prefix.

Try this:
Code:
#
# ---[ OPEN ]----------
#
mx/modules/mx_sitestats/adminstats.php
#
# ---[ FIND ]----------
#
   if( $table_prefix != "" )
   {
      if( strstr($tabledata_ary[$i]['Name'], $table_prefix) )
#
# ---[ REPLACE WITH ]----------
#
   if( $table_prefix != "" && $mx_table_prefix != "" )
   {
      if( strstr($tabledata_ary[$i]['Name'], $table_prefix) ||
         strstr($tabledata_ary[$i]['Name'], $mx_table_prefix) )
#
# ---[ SAVE ]----------
#

Tested on this site, and seems to work. Wink

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
jdivision
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 16
Location: Portugal

PostPosted: Wed Jan 19, 2005 2:26 am    Post subject: Re: Database Size information Reply with quote

No, same problem with a little change: Rolling Eyes

Before:

phpBB ACP database info: 3,50 MB
MX_SiteStats: 3,50 MB
Real database size: 9,76 MB

After

phpBB ACP database info: 3,50 MB
MX_SiteStats: 3,76 MB
Real database size: 9,76 MB

 
 
_________________
Apologies for the bad English...
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Wed Jan 19, 2005 2:50 am    Post subject: Re: Database Size information Reply with quote

Does your database contain other tables? ...or all tables start either with the MX or phpBB prefixes?


.

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
jdivision
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 16
Location: Portugal

PostPosted: Wed Jan 19, 2005 1:58 pm    Post subject: Re: Database Size information Reply with quote

Hi Markus,

Sorry I’m really a rookie… Sad

My phpBB tables prefixes is: bmwphpbb_ and the Mx prefixes is portal_

I don’t know why but I have also phpBB prefixes in some tables but they are all empty …(maybe some previous installation that I made before) Rolling Eyes

 
 
_________________
Apologies for the bad English...
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Wed Jan 19, 2005 4:37 pm    Post subject: Re: Database Size information Reply with quote

Well, you should be able to compare the DB size reported by mx_sitestats in its Adminstats block with the values reported by phpMyAdmin (only for the corresponding phpBB/MX tables).

Any difference?

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
jdivision
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 16
Location: Portugal

PostPosted: Thu Jan 20, 2005 1:40 am    Post subject: Re: Database Size information Reply with quote

markus_petrux wrote:
Well, you should be able to compare the DB size reported by mx_sitestats in its Adminstats block with the values reported by phpMyAdmin (only for the corresponding phpBB/MX tables).

Any difference?


No, no difference at all...

I’m little confused now… How come I have a backup of the database with almost 10 MB, if the real size of the database in phpMyAdmin is 3,5 MB?

(Probably a dumb question, right? Embarassed )

 
 
_________________
Apologies for the bad English...
 
Back to top
View user's profile Send private message
markus
[Administrator]
[Administrator]


Joined: 28 Jul 2003
Posts: 1124

PostPosted: Thu Jan 20, 2005 1:46 am    Post subject: Re: Database Size information Reply with quote

Probably the reason is while phpMyAdmin reports the size of the tables (in binary format), the dump is in text format. ie: it contains the CREATE TABLE, INSERT statements, etc.

Smile

 
 
_________________
http://www.phpmix.org
 
Back to top
View user's profile Send private message
jdivision
Apprentice
Apprentice


Joined: 21 Jul 2004
Posts: 16
Location: Portugal

PostPosted: Thu Jan 20, 2005 11:02 am    Post subject: Re: Database Size information Reply with quote

Tanks Markus Smile
 
 
_________________
Apologies for the bad English...
 
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.   printer-friendly view    phpMiX.org Forum Index -> mxBB Modules -> mxBB Module: mx_sitestats All times are GMT + 1 Hour
 
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum