Use 'char' instead of 'varchar' and INDEX the fields that you will be using in the WHERE clause of your SELECTS.
-----Original Message----- From: Ulterior [mailto:[EMAIL PROTECTED] Sent: Saturday, May 31, 2003 10:35 AM To: [EMAIL PROTECTED] Subject: Re: Insert query sow what would you suggest, Jerry? ( I need a very FAST search on this table's filename field) Ulterior > Don't use varchar unless you absolutely have to, that should help. > > Jerry > > ----- Original Message ----- > From: "Ulterior" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Sent: Saturday, May 31, 2003 3:13 PM > Subject: Insert query > > > > Hi, > > > > I have a database table: > > > > CREATE TABLE FTPFILE ( > > ID int(11) NOT NULL auto_increment, > > FTPSITEID int(11) DEFAULT '0' NOT NULL, > > > > FILENAME varchar(254) DEFAULT 'Not defined' NOT NULL, > > FILEPATH varchar(254) DEFAULT 'Not defined' NOT NULL, > > FILEEXTN varchar(3) DEFAULT '---' NOT NULL, > > FILESIZE int(11) NOT NULL, > > FILEDATE datetime DEFAULT '0000-00-00 00:00:00' NOT NULL, > > > > PRIMARY KEY (ID) > > ); > > > > when this table reaches 10000 records, insert queries are very slow, > > aproximately 2 records a second. > > And worst of all mysql-ntd.exe reaches 99% of my processor timing. > > > > I am using native mysql C API mysql_query() func for inserting data. > > > > Is there any way to speedup insert querys to this table? ( I am planning > to > > have at least 2-5 million entries in this table ) > > > > Ulterior > > > > > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]