Re: Optimizing a query

2008-02-29 Thread Dan Buettner
Chris, this should already be pretty fast as it is using a primary key in its entirety, and as long as the index size remains manageable MySQL will be able to keep it in memory for fast access. That said, doing away with the aggregate function might speed things up just slightly. You don't care h

Optimizing a query

2008-02-29 Thread Chris W
I was wondering if someone could tell me what things I might need to do to make this query as fast as possible. I am developing a web site where users will have access to certain things based on what groups they are in and what groups have access to certain things. There are several different

Re: Optimizing a query

2003-08-21 Thread Jeremy Zawodny
On Thu, Aug 21, 2003 at 01:03:16AM +, gord barq wrote: > I have this query which does a left outer join and it takes forever (like > half a day). Here are the results of an explain analysis. > > mysql> explain SELECT count(searchresult.title) AS number, > campaigntrack.title, tracknum, track

Re: Optimizing a query

2003-08-21 Thread Jon Drukman
gord barq wrote: I have this query which does a left outer join and it takes forever (like half a day). Here are the results of an explain analysis. mysql> explain SELECT count(searchresult.title) AS number, campaigntrack.title, tracknum, trackid FROM campaigntrack LEFT OUTER JOIN searchresult

Optimizing a query

2003-08-21 Thread gord barq
I have this query which does a left outer join and it takes forever (like half a day). Here are the results of an explain analysis. mysql> explain SELECT count(searchresult.title) AS number, campaigntrack.title, tracknum, trackid FROM campaigntrack LEFT OUTER JOIN searchresult ON searchresult.t

Re: Trouble optimizing a query

2003-06-07 Thread Becoming Digital
;[EMAIL PROTECTED]> Sent: Saturday, 07 June, 2003 17:28 Subject: Re: Trouble optimizing a query On Sat, 7 Jun 2003 15:33 , Paul DuBois <[EMAIL PROTECTED]> sent: > >This is a problem that is fixed in MySQL 4. If you can upgrade, that >should help you a lot. > >http://www

Re: Trouble optimizing a query

2003-06-07 Thread lists
On Sat, 7 Jun 2003 15:33 , Paul DuBois <[EMAIL PROTECTED]> sent: > >This is a problem that is fixed in MySQL 4. If you can upgrade, that >should help you a lot. > >http://www.mysql.com/doc/en/News-4.0.0.html > That explains that. I was relying on the online docs and it didn't even occur to me

Re: Trouble optimizing a query

2003-06-07 Thread Paul DuBois
At 22:29 +0200 6/7/03, <[EMAIL PROTECTED]> wrote: Hello everyone, I'm working with MySQL 3.23.41-log developing a chat application. I need to run a query, order the results in descending order, then get the last 0-15 entries that are less than 20 minutes old. The query and tables in question a

Trouble optimizing a query

2003-06-07 Thread lists
Hello everyone, I'm working with MySQL 3.23.41-log developing a chat application. I need to run a query, order the results in descending order, then get the last 0-15 entries that are less than 20 minutes old. The query and tables in question are explained at the bottom of this posting. In

Need help optimizing a query

2002-02-13 Thread david
I need to optimize the following query: SELECT user, sum(in), sum(out) FROM stats WHERE from>='20020205' AND to<='20020206' GROUP BY user; In,out are bigint, user is varcher(20) and from,to are timestamp And I want to speed up this type of query, but I have not been able to to get it to use an

Need help optimizing a query

2002-02-07 Thread david
I need to optimize the following query: SELECT user, sum(in), sum(out) FROM stats WHERE from>='20020205' AND to<='20020206' GROUP BY user; In,out are bigint, user is varcher(20) and from,to are timestamp And I want to speed up this type of query, but I have not been able to to get it to use an

Optimizing a query with a new index

2001-05-29 Thread Iago Sineiro
Hi all. I want to optimize a query that is executed often in the application we use at work. NOTE: Excuse me for using spanish names for the tables and the columns. In the database we have three tables for article: ARTICULOINFO (information of an article), LARTICULOINFO_IDIOMA (information of a