Re: Help optimizing query

2004-11-23 Thread Jesse Sheidlower
On Tue, Nov 23, 2004 at 09:55:15PM +0100, [EMAIL PROTECTED] wrote: > * Jesse Sheidlower > [...] > > CREATE TABLE `citation_subject` ( > > `id` int(11) NOT NULL auto_increment, > > `citation_id` int(11) NOT NULL default '0', > > `subject_id` int(11) NOT NULL default '0', > > PRIMARY KEY (`i

Re: Help optimizing query

2004-11-23 Thread roger
* Jesse Sheidlower [...] > CREATE TABLE `citation_subject` ( > `id` int(11) NOT NULL auto_increment, > `citation_id` int(11) NOT NULL default '0', > `subject_id` int(11) NOT NULL default '0', > PRIMARY KEY (`id`), > KEY `citation_id` (`citation_id`,`subject_id`) > ) Try adding an index

Help optimizing query

2004-11-23 Thread Jesse Sheidlower
I have what I thought was a simple, well-indexed query, but it turns out that it's acting as a pretty big drag. The one thing that's clearly a problem (though I'm not sure of the extent of the problem), I'm not sure how to fix. There are three tables: citations, subjects, and a many-to-many table

RE: Need help optimizing query

2004-07-15 Thread Patrick Drouin
Hello Victor, > What version of MySQL are you using? Have you > checked the cardinality on > these tables? Problem solved! Optimizing the table brought the query time down to 17 secs Wow! Thanks for the input Victor and merci to Arnaud for the quick fix. Patrick ___

RE: Need help optimizing query

2004-07-15 Thread Victor Pendleton
What version of MySQL are you using? Have you checked the cardinality on these tables? -Original Message- From: Patrick Drouin To: [EMAIL PROTECTED] Sent: 7/15/04 8:27 AM Subject: Need help optimizing query Hello everyone, I'm having a hard time with the following query. It retr

Re: Need help optimizing query

2004-07-15 Thread Patrick Drouin
Bonjour Arnaud, --- Arnaud <[EMAIL PROTECTED]> wrote: > On 15 Jul 2004 at 6:27, Patrick Drouin > Your indexes look good, but I see that you have some > varchar fields. > Maybe > you could run an "optimize table" on these tables? I'm running it at the moment, I will follow-up on the list when it'

Re: Need help optimizing query

2004-07-15 Thread Arnaud
On 15 Jul 2004 at 6:27, Patrick Drouin <[EMAIL PROTECTED]> wrote: > I'm having a hard time with the following query. It > retrieves about 3K rows from a few tables. One of them > contains over 40M rows. When run on a 3Ghz server with > 1G of RAM it returns the rows in more than 1 mini. I > don't

Need help optimizing query

2004-07-15 Thread Patrick Drouin
Hello everyone, I'm having a hard time with the following query. It retrieves about 3K rows from a few tables. One of them contains over 40M rows. When run on a 3Ghz server with 1G of RAM it returns the rows in more than 1 mini. I don't think that's normal. Here's the output of EXPLAIN: mysql>

Re: Need help optimizing query, awfully slow on only 20000 records

2003-08-21 Thread Apollo (Carmel Entertainment)
Absolutely! I have multiple indexes. I think it might be a problem with ODBC > Are your tables indexed? http://www.mysql.com/doc/en/MySQL_indexes.html > > Saqib Ali > - > http://www.xml-dev.com > > - Visit CARMEL MUSIC & ENTERTAINMENT we

Re: Need help optimizing query, awfully slow on only 20000 records

2003-08-21 Thread SAQIB
Are your tables indexed? http://www.mysql.com/doc/en/MySQL_indexes.html Saqib Ali - http://www.xml-dev.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

RE: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Michael S. Fischer
2 PM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: RE: Need help optimizing query, awfully slow on only > 2 records > > > When following query is pulled up, it takes about whole 1-2 > minutes to come up. "inquiries" table has 17000 records, > &

RE: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Michael S. Fischer
ilto:[EMAIL PROTECTED] > Sent: Wednesday, August 20, 2003 3:14 PM > To: Michael S. Fischer > Cc: [EMAIL PROTECTED] > Subject: RE: Need help optimizing query, awfully slow on only > 2 records > > > > Result of EXPLAIN is: > table|type|possible_keys|key|key_len|ref|ro

RE: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Apollo (Carmel Entertainment)
; > Sent: Wednesday, August 20, 2003 3:14 PM > > To: Michael S. Fischer > > Cc: [EMAIL PROTECTED] > > Subject: RE: Need help optimizing query, awfully slow on only > > 2 records > > > > > > > > Result of EXPLAIN is: > > table|type|poss

Re: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Apollo (Carmel Entertainment)
Query takes 3.4 seconds to run on the server, but it takes 1-2minutes to run via MyODBC 3.51.06 using passthrough (Access97 is the front end, but it has query type that allows bypass of Access interpretation. > Two Questions: > > Is the same query running directly on the linux server thru mysql i

RE: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Apollo (Carmel Entertainment)
ment) [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, August 20, 2003 2:52 PM > > To: [EMAIL PROTECTED] > > Cc: [EMAIL PROTECTED] > > Subject: RE: Need help optimizing query, awfully slow on only > > 2 records > > > > > > When following query is pull

RE: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Apollo (Carmel Entertainment)
gt; > Sent: 19 August 2003 17:29 > > To: [EMAIL PROTECTED] > > Subject: Need help optimizing query, awfully slow on only > > 2 records > > > > > > 1.2Ghz Pentium, with 1/2Gig of ram, 4.0.14MySQL, RedHat9.0 > > > > I have about 20K records that res

RE: Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Jim Smith
IL PROTECTED] > Subject: Need help optimizing query, awfully slow on only > 2 records > > > 1.2Ghz Pentium, with 1/2Gig of ram, 4.0.14MySQL, RedHat9.0 > > I have about 20K records that result from the following > query. Front end for the > database is ACCESS97 and pulling up

Need help optimizing query, awfully slow on only 20000 records

2003-08-20 Thread Mechain Marc
Two Questions: Is the same query running directly on the linux server thru mysql is also very slow ? Have you done a explain plan on the query ? Marc. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Need help optimizing query, awfully slow on only 20000 records

2003-08-19 Thread Apollo (Carmel Entertainment)
1.2Ghz Pentium, with 1/2Gig of ram, 4.0.14MySQL, RedHat9.0 I have about 20K records that result from the following query. Front end for the database is ACCESS97 and pulling up 20K records makes a huge performance hit. For the form in question I am using PASSTHROUGH type query (the one that just pa

Need help optimizing query

2002-10-05 Thread johnt
Greetings, I am struggling trying to get good performance using indexes. I'll spare the details and narrow down the situation. I have about 100,000 rows of data with the following fields: title - vachar(64) description - text state - varchar(2) priority - int modified - date People type in

Help Optimizing Query...

2002-06-12 Thread Matthew Walker
I need help optimizing the query below. I've included the query, the table declerations, and the output of explain. Any help would be greatly appreciated. What I'd really like is to find out how to get it to use a key on the lineitems table. I've tried adding indexes on the OrderID and MerchantID