[Snort-users] Speeding up mysql

quentyn at ...3871... quentyn at ...3871...
Fri Oct 19 10:25:22 EDT 2001


> Kevin Brown wrote:
> 
> What schema are you using?  What version of Mysql?  I'm using schema
> 104, Mysql 3.23.43 and according to the mysql manual (looking at
> mysql.com) it says that indexes are automatically made on Primary
> keynames.  So doing a "show index from <tbl_name>" shows that each of
> the tables that contain a CID column are indexed already.  Same thing
> with signature in the event table and sig_id in the signature table.
> 
> > -----Original Message-----
> > From: quentyn at ...3871... [mailto:quentyn at ...3871...]
> > Sent: Friday, October 19, 2001 09:42
> > To: snort-users at lists.sourceforge.net
> > Subject: [Snort-users] Speeding up mysql
> >

it is the way mysql indexing works

these are answers from 2 different people 


the primary key covers 2 fields, however the join refers to the 2ndary
field and in the current indexing structure of MYSQL it would appear
that this prevents the index being used, hence the queries performing a
table scan (which takes ages). By adding a non unique index on the 2nd
field you see a performance increase


in multi column indexes mysql doesn't no use the index if you haven't
referenced the 1st column of the index.


or something or other.....


Q


-- 
#####################
Quentyn Taylor
Sysadmin - Fotango
#####################
"The way NT mounts filesystems is something I'd expect to find in a
barnyard or on a
stock-breeding farm." 
   Mike Andrews, ASR




More information about the Snort-users mailing list