View Full Version : Session table
buro9
Sun 26th Oct '03, 2:02pm
I had a crazy idea that the vBulletin session table was a HEAP table... that is to say that it was based in memory and not on disk.
I just moved server though, and on restoring the database used PhpMyAdmin to view them, and it is reporting that the vBulletin session table is a MyISAM table.
Is it supposed to be a MyISAM table?
Wouldn't it be better as a HEAP table?
Cheers
David K
Steve Machol
Sun 26th Oct '03, 2:26pm
It should be HEAP. You should change this back in phpMyAdmin.
buro9
Sun 26th Oct '03, 2:35pm
Ah, thought so... that'd be why in less than a day it already has considerable overhead to it ;)
Of course... leaves me wondering just how it came to be MyISAM... but I'll leave that for another day.
buro9
Sun 26th Oct '03, 2:52pm
Found the offender.
It happened when I did the MySql dump. I used the command line tool and the session table is described as:
DROP TABLE IF EXISTS session;
CREATE TABLE session (
...
) TYPE=MyISAM;
I'm running MySQL 4.0.15-standard on both servers... so it's this that has done it.
I'd suggest that if anyone else has done a full restore recently that they check their table types using PhpMyAdmin :)
Thanks Steve :) Confirmed what I thought ;)
Steve Machol
Sun 26th Oct '03, 4:20pm
I'm running 4.0.15-standard and my backup file creats this as HEAP:
CREATE TABLE session (
sessionhash char(32) NOT NULL default '',
userid int(10) unsigned NOT NULL default '0',
host char(50) NOT NULL default '',
useragent char(50) NOT NULL default '',
lastactivity int(10) unsigned NOT NULL default '0',
styleid smallint(5) unsigned NOT NULL default '0',
location char(255) NOT NULL default '',
althash char(32) NOT NULL default '',
PRIMARY KEY (sessionhash)
) TYPE=HEAP;
buro9
Sun 26th Oct '03, 4:46pm
Well now I am baffled.
I only did this back up two days ago from within SSH, and I got the MyISAM.
I can't now check what type of table was on my old server due to my nuking that database and the vBulletin installation immediately after the move (as you do to stay properly licensed)... but I'm positive that it was HEAP on the old server... hence my initial post.
If it wasn't the dump... then maybe a Cpanel scripted update did something funny at some point in time.
Well... no worries. So long as I've got my HEAP back I can sleep well ;)
eva2000
Mon 27th Oct '03, 9:40am
easy test it again with
mysqldump --opt -d -u root -p vbdatabasename session > session.sql
open up session.sql and see
buro9
Mon 27th Oct '03, 3:21pm
easy test it again with
mysqldump --opt -d -u root -p vbdatabasename session > session.sql
open up session.sql and see
Indeed, I do database dumps every 12 hours, and the ones from today are all fine.
However, I went back through my back-ups and it appears that it first appeared as a MyISAM table around early September.
-- MySQL dump 9.08
--
-- Host: localhost Database: [snip!/]
---------------------------------------------------------
-- Server version 4.0.14-standard
[snip!/]
--
-- Table structure for table 'session'
--
DROP TABLE IF EXISTS session;
CREATE TABLE session (
[snip!/]
) TYPE=MyISAM;
Not sure what happened then or why... but something then changed its type and it must've stayed that way since then.
I certainly do not go round changing my database table types, and no-one else has access to the database. So it only leaves scripts such as the Cpanel updates, fix permissions, or something... because something did change the table and that something wasn't me.
I don't care though... I never do :) So long it's as it should be and the database is tickety-boo I'm a happy fellow. My greater concern was rectifying what I thought was a strange thing, and whilst I'm curious as to how it came about... I'm (I@m) not too bothered now that its fine again :)
vBulletin® v3.8.0 Release Candidate 1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.