MySQL Forums
Forum List  »  Stored Procedures

Re: Query with variables very slow
Posted by: Gianni Moretti
Date: January 30, 2012 02:18AM

Sorry I haven't made myself clear...yes the field is part of the primary key (in the example below is field4):

CREATE TABLE `table_name` (
`field1` varchar(4) NOT NULL DEFAULT '',
..
`field2` smallint(6) NOT NULL DEFAULT '0',
`field3` date DEFAULT NULL,
..
`field4` varchar(20) NOT NULL DEFAULT '',
..
PRIMARY KEY (`field1`,`field2`,`field3`,`field4`),
KEY `txkey` (`field1`,`field2`,`field4`),
KEY `txfield1` (`field1`),
KEY `txfield2` (`field2`),
KEY `txfield3` (`field4`),
KEY `txfield4` (`field6`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1

I didn't create the table, I'm trying just to retrieve data from this table...I will try to increase the buffer to discover if there is an improvement.

Thanks

Gianni

Options: ReplyQuote


Subject
Views
Written By
Posted
2418
January 27, 2012 10:38PM
1163
January 28, 2012 06:41PM
2171
January 28, 2012 10:16PM
1251
January 29, 2012 07:09PM
Re: Query with variables very slow
1273
January 30, 2012 02:18AM
1281
January 30, 2012 03:39AM
1124
January 31, 2012 03:20AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.