ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: "Grigory Batalov" <bga@altlinux.org>
To: devel@lists.altlinux.org
Subject: Re: [devel] Mysqld CPU usage at www.sisyphus.ru
Date: Tue, 1 Sep 2009 18:49:53 +0400
Message-ID: <20090901184953.710824a4@bga> (raw)
In-Reply-To: <20090901174018.7f06c9f2@satellite.immomsk.ru>

On Tue, 1 Sep 2009 17:40:18 +0400
Alex Gorbachenko wrote:

> >> innodb ? если да, то OPTIMIZE TABLE как давно делался ?
> >
> >Сделал сейчас, но что-то разницы не заметно.
> 
> тогда запрос и explain от него - в студию.

Вот такие запросы тормозят:

SELECT DISTINCT s.name, s.version, s.rel, m.packager, s.summary, s.repo
FROM srpm as s, maintainers as m, rpm as r WHERE  r.srpm = s.name AND
m.mail=s.packager AND ( s.name RLIKE 'unichrome'  OR  s.summary RLIKE
'unichrome'  OR  s.description RLIKE 'unichrome'  OR  r.namen RLIKE
'unichrome' ) AND s.repo='Sisyphus' AND r.repo='Sisyphus' ORDER BY 1
ASC LIMIT 0,20;

Может быть, заменить RLIKE на MATCH AGAINST ? Будет быстрее?

Таблицы невелики:

mysql> select count(*) from srpm;
+----------+
| count(*) |
+----------+
|    38240 | 
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from rpm;
+----------+
| count(*) |
+----------+
|   109232 | 
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from maintainers;
+----------+
| count(*) |
+----------+
|      250 | 
+----------+
1 row in set (0.01 sec)


  reply	other threads:[~2009-09-01 14:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-01 13:08 Grigory Batalov
2009-09-01 13:10 ` Alexey I. Froloff
2009-09-01 13:11 ` Alex Gorbachenko
2009-09-01 13:32   ` Grigory Batalov
2009-09-01 13:40     ` Alex Gorbachenko
2009-09-01 14:49       ` Grigory Batalov [this message]
2009-09-01 15:03         ` Mikhail Yakshin
2009-09-01 19:20           ` Grigory Batalov
2009-09-01 19:21             ` Aleksey Avdeev
2009-09-01 20:27               ` Grigory Batalov
2009-09-01 21:47             ` Mikhail Yakshin
2009-09-02  1:16               ` Денис Смирнов
2009-09-02  4:35                 ` Mikhail Yakshin
2009-09-01 13:12 ` Michael Shigorin
2009-09-01 16:36 ` Vitaly Lipatov
2009-09-01 20:49 ` Денис Смирнов

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090901184953.710824a4@bga \
    --to=bga@altlinux.org \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git