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
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
-Original Message-
From: Brian Dunning [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 07, 2007 1:12 PM
To: mysql
Subject: Help optimizing this query?
This is the query that's killing me in the slow query log, usually
taking around 20 seconds:
select count(ip) as counted,stamp from
Message-
From: Brian Dunning [mailto:[EMAIL PROTECTED]
Sent: Sunday, January 07, 2007 1:12 PM
To: mysql
Subject: Help optimizing this query?
This is the query that's killing me in the slow query log, usually
taking around 20 seconds:
select count(ip) as counted,stamp from ip_addr where stamp=NOW
optimizing this query?
This is the query that's killing me in the slow query log, usually
taking around 20 seconds:
select count(ip) as counted,stamp from ip_addr where stamp=NOW()-
interval 14 day and source='sometext' group by stamp order by stamp
desc;
Here is the table:
CREATE TABLE
This is the query that's killing me in the slow query log, usually
taking around 20 seconds:
select count(ip) as counted,stamp from ip_addr where stamp=NOW()-
interval 14 day and source='sometext' group by stamp order by stamp
desc;
Here is the table:
CREATE TABLE `ip_addr` (
`ip`
Brian Dunning wrote:
This is the query that's killing me in the slow query log, usually
taking around 20 seconds:
select count(ip) as counted,stamp from ip_addr where
stamp=NOW()-interval 14 day and source='sometext' group by stamp
order by stamp desc;
Here is the table:
CREATE TABLE
Hello,
I need some help optimizing a query. The current query is as follows:
SELECT *,
MATCH(title) AGAINST ( 'S' IN BOOLEAN MODE ) AS score
FROM articles
WHERE MATCH(title) AGAINST ( 'S' IN BOOLEAN MODE );
'title' is a FULLTEXT index.
'S' is a query string that may have 100 search
Brosnan wrote:
Hello,
I need some help optimizing a query. The current query is as follows:
SELECT *,
MATCH(title) AGAINST ( 'S' IN BOOLEAN MODE ) AS score
FROM articles
WHERE MATCH(title) AGAINST ( 'S' IN BOOLEAN MODE );
'title' is a FULLTEXT index.
'S' is a query string that may have
Hi all,
I have an audio tracks info table, let's call it Tracks;
every Track can have one or more ' Character' ( it is not a genre, it
is something like 'Italian' or 'International' or '80's' or 'evergreen'
)
so a track can be 'International' and 'Evergreen', or 'Italian' and
'70's')
I have
list wont change that
often? should be ok.
--
Dave
- Original Message -
From: Giulio [EMAIL PROTECTED]
To: MySQL List [EMAIL PROTECTED]
Sent: Monday, July 12, 2004 1:50 PM
Subject: can you help me optimizing this query?
Hi all,
I have an audio tracks info table, let's call it Tracks
I've found a solution so I'm answering to myself, for who can be
interested and for asking if I've done something that could affect on
some way my DB performances.
I've added an index to both the columns that I use for the ON clause of
my left join query, and now it runs at the speed of
to:
|
| Subject: can you help me optimizing this query
:
|
| Fax to:
|
| Subject: Re: can you help me optimizing this query
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
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
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, trackid
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
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
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 that
]
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.mysql.com/doc/en/News-4.0.0.html
That explains
Hello,
I am relatively new to MySQL though I have database experience.
I have a query that doesn't seem to want to use an index for the first
table despite my indexing several fields. Before I get too far in the
details of the query, here is what EXPLAIN SELECT tells me for the
first
How do I optimize the following query?
SELECT foo.id FROM foo, bar WHERE foo.id = bar.foo_id AND foo.field =
'baz' OR bar.field = 'baz';
Only a small number of records from each table match the query
conditions, but MySQL takes forever to execute it. No wonder, when
EXPLAIN says it needs to
[EMAIL PROTECTED] wrote:
The form Select foo.id From foo, bar... is giving you a cross-product. A
cross-product emits a row for every combination of rows from each of your
tables. The Explain results seem to be consistent with this. What I'd
suggest is that you try a Join on your tables.
Thanks
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
On Tue, Jan 22, 2002 at 10:12:55AM -0600, Solsberry, Glendon wrote:
I have mySQL v3.23 running on a Mandrake 8.1 box (AMD 1600XP, 512MB
RAM). The problem is that the main query (listed below) takes
approximately 3 hours to run.
[snip]
Wow! Thanks for all the detail.
The query is this:
I have mySQL v3.23 running on a Mandrake 8.1 box (AMD 1600XP, 512MB
RAM).
The problem is that the main query (listed below) takes approximately 3
hours to run.
my.cnf looks like:
[mysqld]
port= 3306
socket = /tmp/mysql.sock
skip-locking
set-variable= key_buffer=128M
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
28 matches
Mail list logo