LINUX.ORG.RU

Сообщения kir64

 

Проблема с Xorg

Форум — Desktop

Привет!

Есть моноблок acer emachines ez1700, на котором с USB-flash загружается CentOS 6.2. Суть задачи: при загрузке с флэшки автоматически поднимается Xorg-server без всяких DM, запускается программулина на C#\mono. Однако, столкнулся с проблемами при запуске Xorg. Ставил их через

yum groupinstall "Система X Window"
Лог Xorg, сгенерированный после startx: http://fpaste.org/xBa1/

Что делать с ошибкой по поводу клавиатуры - не знаю. Для HDA Intel ставил доп модули из репозитория elrepo - не помогло.

Вчера весь день голову ломал - так ни к чему и не пришел. Прошу помощи!

 , ,

kir64
()

Тяжелые запросы в mysql

Форум — Admin

Здравствуйте, жители ЛОРа!

Посоветуйте, пожалуйста, как быть в такой ситуации: есть арендованный сервер c Intel(R) Xeon(R) CPU E5620 @ 2.40GHz и 12 Gb памяти на борту, Centos 5.7 + AMP, на котором лежит некий интернет-проект с посещаемостью 1500-2000 человек в день.

Несколько дней назад на одной из страниц начались дичайшие тормоза - загрузка страницы занимает порядка 100 секунд.

Грузят ее 3 mysql-запроса:

SELECT COUNT('x') as CNT
FROM
b_sonet_log L
INNER JOIN ( SELECT MIN(ID) AS ID, TMP_ID
FROM
b_sonet_log L
WHERE
( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = L.EVENT_ID AND ((SLE.VISIBLE = 'Y')) ) OR ( L.ENTITY_TYPE IN ('G','U') AND EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = L.EVENT_ID AND ((SLE.VISIBLE = 'Y')) ) ) OR ( ( NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = L.EVENT_ID ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = L.EVENT_ID AND SLE.VISIBLE = 'I' ) ) AND ( L.ENTITY_TYPE NOT IN ('G','U') OR NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = L.EVENT_ID ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = L.EVENT_ID AND SLE.VISIBLE = 'I' ) ) AND ( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = 'all' AND ((SLE.VISIBLE = 'Y')) ) OR ( L.ENTITY_TYPE IN ('G','U') AND EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = 'all' AND ((SLE.VISIBLE = 'Y')) ) ) OR ( ( NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = 'all' ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = 'all' AND SLE.VISIBLE = 'I' ) ) AND ( L.ENTITY_TYPE NOT IN ('G','U') OR NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = 'all' ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = 'all' AND SLE.VISIBLE = 'I' ) ) AND ( ( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = L.EVENT_ID AND ((SLE.VISIBLE = 'Y')) ) OR ( ( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = L.EVENT_ID AND SLE.VISIBLE = 'I' ) OR NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = L.EVENT_ID ) ) AND ( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = 'all' AND ((SLE.VISIBLE = 'Y')) ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = 'all' AND SLE.VISIBLE = 'I' ) OR NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = 'all' ) ) ) ) ) ) ) ))
GROUP BY
TMP_ID ) L1 ON L1.ID = L.ID
LEFT JOIN b_sonet_group G ON (L.ENTITY_TYPE = 'G' AND L.ENTITY_ID = G.ID)
LEFT JOIN b_user U ON (L.ENTITY_TYPE = 'U' AND L.ENTITY_ID = U.ID)
LEFT JOIN b_user U1 ON L.USER_ID = U1.ID
LEFT JOIN b_rating_voting RG ON L.RATING_TYPE_ID = RG.ENTITY_TYPE_ID AND L.RATING_ENTITY_ID = RG.ENTITY_ID
LEFT JOIN b_rating_vote RV ON L.RATING_TYPE_ID = RV.ENTITY_TYPE_ID AND L.RATING_ENTITY_ID = RV.ENTITY_ID AND RV.USER_ID = 419
WHERE
((((L.SITE_ID = 's1' )) OR ((L.SITE_ID IS NULL) OR (length(L.SITE_ID) <= 0) OR (L.SITE_ID = '' )))) AND ((((L.LOG_DATE <= '2012-05-13 13:01:10')))) AND EXISTS ( SELECT SLR.ID
FROM
b_sonet_log_right SLR
INNER JOIN b_user_access UA ON 0=1 OR SLR.GROUP_CODE = 'SA' OR (SLR.GROUP_CODE = 'AU') OR (SLR.GROUP_CODE = 'G2') OR (UA.ACCESS_CODE = SLR.GROUP_CODE AND UA.USER_ID = 419)
WHERE
L.ID = SLR.LOG_ID) 
Время выполнения: 35.90033 сек.
SELECT L.ID as ID, L.TMP_ID as TMP_ID, L.ENTITY_TYPE as ENTITY_TYPE, L.ENTITY_ID as ENTITY_ID, L.USER_ID as USER_ID, L.EVENT_ID as EVENT_ID, DATE_FORMAT(L.LOG_DATE, '%d.%m.%Y %H:%i:%s') as LOG_DATE, L.LOG_UPDATE as LOG_UPDATE_X1, DATE_FORMAT(L.LOG_UPDATE, '%d.%m.%Y %H:%i:%s') as LOG_UPDATE, L.TITLE_TEMPLATE as TITLE_TEMPLATE, L.TITLE as TITLE, L.MESSAGE as MESSAGE, L.TEXT_MESSAGE as TEXT_MESSAGE, L.URL as URL, L.MODULE_ID as MODULE_ID, L.CALLBACK_FUNC as CALLBACK_FUNC, L.EXTERNAL_ID as EXTERNAL_ID, L.SITE_ID as SITE_ID, L.PARAMS as PARAMS, L.COMMENTS_COUNT as COMMENTS_COUNT, L.ENABLE_COMMENTS as ENABLE_COMMENTS, L.SOURCE_ID as SOURCE_ID, G.NAME as GROUP_NAME, G.OWNER_ID as GROUP_OWNER_ID, G.INITIATE_PERMS as GROUP_INITIATE_PERMS, G.VISIBLE as GROUP_VISIBLE, G.OPENED as GROUP_OPENED, G.IMAGE_ID as GROUP_IMAGE_ID, U.NAME as USER_NAME, U.LAST_NAME as USER_LAST_NAME, U.SECOND_NAME as USER_SECOND_NAME, U.LOGIN as USER_LOGIN, U.PERSONAL_PHOTO as USER_PERSONAL_PHOTO, U.PERSONAL_GENDER as USER_PERSONAL_GENDER, U1.NAME as CREATED_BY_NAME, U1.LAST_NAME as CREATED_BY_LAST_NAME, U1.SECOND_NAME as CREATED_BY_SECOND_NAME, U1.LOGIN as CREATED_BY_LOGIN, U1.PERSONAL_PHOTO as CREATED_BY_PERSONAL_PHOTO, U1.PERSONAL_GENDER as CREATED_BY_PERSONAL_GENDER, L.RATING_TYPE_ID as RATING_TYPE_ID, L.RATING_ENTITY_ID as RATING_ENTITY_ID, ifnull(RG.TOTAL_VALUE, 0) as RATING_TOTAL_VALUE, ifnull(RG.TOTAL_VOTES, 0) as RATING_TOTAL_VOTES, ifnull(RG.TOTAL_POSITIVE_VOTES, 0) as RATING_TOTAL_POSITIVE_VOTES, ifnull(RG.TOTAL_NEGATIVE_VOTES, 0) as RATING_TOTAL_NEGATIVE_VOTES, ifnull(RV.VALUE, 0) as RATING_USER_VOTE_VALUE
FROM
b_sonet_log L
INNER JOIN ( SELECT MIN(ID) AS ID, TMP_ID
FROM
b_sonet_log L
WHERE
( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = L.EVENT_ID AND ((SLE.VISIBLE = 'Y')) ) OR ( L.ENTITY_TYPE IN ('G','U') AND EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = L.EVENT_ID AND ((SLE.VISIBLE = 'Y')) ) ) OR ( ( NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = L.EVENT_ID ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = L.EVENT_ID AND SLE.VISIBLE = 'I' ) ) AND ( L.ENTITY_TYPE NOT IN ('G','U') OR NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = L.EVENT_ID ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = L.EVENT_ID AND SLE.VISIBLE = 'I' ) ) AND ( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = 'all' AND ((SLE.VISIBLE = 'Y')) ) OR ( L.ENTITY_TYPE IN ('G','U') AND EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = 'all' AND ((SLE.VISIBLE = 'Y')) ) ) OR ( ( NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = 'all' ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_CB = 'N' AND SLE.ENTITY_ID = L.ENTITY_ID AND SLE.EVENT_ID = 'all' AND SLE.VISIBLE = 'I' ) ) AND ( L.ENTITY_TYPE NOT IN ('G','U') OR NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = 'all' ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_CB = 'Y' AND SLE.ENTITY_ID = L.USER_ID AND SLE.EVENT_ID = 'all' AND SLE.VISIBLE = 'I' ) ) AND ( ( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = L.EVENT_ID AND ((SLE.VISIBLE = 'Y')) ) OR ( ( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = L.EVENT_ID AND SLE.VISIBLE = 'I' ) OR NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = L.EVENT_ID ) ) AND ( EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = 'all' AND ((SLE.VISIBLE = 'Y')) ) OR EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = 'all' AND SLE.VISIBLE = 'I' ) OR NOT EXISTS( SELECT ID
FROM
b_sonet_log_events SLE
WHERE
SLE.USER_ID = 419 AND SLE.ENTITY_TYPE = L.ENTITY_TYPE AND SLE.ENTITY_ID = 0 AND SLE.ENTITY_MY = 'N' AND SLE.EVENT_ID = 'all' ) ) ) ) ) ) ) ))
GROUP BY
TMP_ID ) L1 ON L1.ID = L.ID
LEFT JOIN b_sonet_group G ON (L.ENTITY_TYPE = 'G' AND L.ENTITY_ID = G.ID)
LEFT JOIN b_user U ON (L.ENTITY_TYPE = 'U' AND L.ENTITY_ID = U.ID)
LEFT JOIN b_user U1 ON L.USER_ID = U1.ID
LEFT JOIN b_rating_voting RG ON L.RATING_TYPE_ID = RG.ENTITY_TYPE_ID AND L.RATING_ENTITY_ID = RG.ENTITY_ID
LEFT JOIN b_rating_vote RV ON L.RATING_TYPE_ID = RV.ENTITY_TYPE_ID AND L.RATING_ENTITY_ID = RV.ENTITY_ID AND RV.USER_ID = 419
WHERE
((((L.SITE_ID = 's1' )) OR ((L.SITE_ID IS NULL) OR (length(L.SITE_ID) <= 0) OR (L.SITE_ID = '' )))) AND ((((L.LOG_DATE <= '2012-05-13 13:01:10')))) AND EXISTS ( SELECT SLR.ID
FROM
b_sonet_log_right SLR
INNER JOIN b_user_access UA ON 0=1 OR SLR.GROUP_CODE = 'SA' OR (SLR.GROUP_CODE = 'AU') OR (SLR.GROUP_CODE = 'G2') OR (UA.ACCESS_CODE = SLR.GROUP_CODE AND UA.USER_ID = 419)
WHERE
L.ID = SLR.LOG_ID)
ORDER BY
LOG_UPDATE_X1 DESC
LIMIT 0, 21 
Время выполнения: 35.6832 сек.

SELECT LC.ID as ID, LC.LOG_ID as LOG_ID, LC.SOURCE_ID as SOURCE_ID, LC.ENTITY_TYPE as ENTITY_TYPE, LC.ENTITY_ID as ENTITY_ID, LC.USER_ID as USER_ID, LC.EVENT_ID as EVENT_ID, LC.LOG_DATE as LOG_DATE_X1, DATE_FORMAT(LC.LOG_DATE, '%d.%m.%Y %H:%i:%s') as LOG_DATE, LC.MESSAGE as MESSAGE, LC.TEXT_MESSAGE as TEXT_MESSAGE, LC.URL as URL, LC.MODULE_ID as MODULE_ID, G.NAME as GROUP_NAME, G.OWNER_ID as GROUP_OWNER_ID, G.VISIBLE as GROUP_VISIBLE, G.OPENED as GROUP_OPENED, G.IMAGE_ID as GROUP_IMAGE_ID, U.NAME as USER_NAME, U.LAST_NAME as USER_LAST_NAME, U.SECOND_NAME as USER_SECOND_NAME, U.LOGIN as USER_LOGIN, U.PERSONAL_PHOTO as USER_PERSONAL_PHOTO, U.PERSONAL_GENDER as USER_PERSONAL_GENDER, U1.NAME as CREATED_BY_NAME, U1.LAST_NAME as CREATED_BY_LAST_NAME, U1.SECOND_NAME as CREATED_BY_SECOND_NAME, U1.LOGIN as CREATED_BY_LOGIN, U1.PERSONAL_PHOTO as CREATED_BY_PERSONAL_PHOTO, U1.PERSONAL_GENDER as CREATED_BY_PERSONAL_GENDER, L.SITE_ID as LOG_SITE_ID, LC.RATING_TYPE_ID as RATING_TYPE_ID, LC.RATING_ENTITY_ID as RATING_ENTITY_ID, ifnull(RG.TOTAL_VALUE, 0) as RATING_TOTAL_VALUE, ifnull(RG.TOTAL_VOTES, 0) as RATING_TOTAL_VOTES, ifnull(RG.TOTAL_POSITIVE_VOTES, 0) as RATING_TOTAL_POSITIVE_VOTES, ifnull(RG.TOTAL_NEGATIVE_VOTES, 0) as RATING_TOTAL_NEGATIVE_VOTES, ifnull(RV.VALUE, 0) as RATING_USER_VOTE_VALUE
FROM
b_sonet_log_comment LC
LEFT JOIN b_sonet_log L ON (LC.LOG_ID = L.TMP_ID)
LEFT JOIN b_sonet_group G ON (LC.ENTITY_TYPE = 'G' AND LC.ENTITY_ID = G.ID)
LEFT JOIN b_user U ON (LC.ENTITY_TYPE = 'U' AND LC.ENTITY_ID = U.ID)
LEFT JOIN b_user U1 ON LC.USER_ID = U1.ID
LEFT JOIN b_rating_voting RG ON LC.RATING_TYPE_ID = RG.ENTITY_TYPE_ID AND LC.RATING_ENTITY_ID = RG.ENTITY_ID
LEFT JOIN b_rating_vote RV ON LC.RATING_TYPE_ID = RV.ENTITY_TYPE_ID AND LC.RATING_ENTITY_ID = RV.ENTITY_ID AND RV.USER_ID = 419
WHERE
((((L.SITE_ID = 's1' )) OR ((L.SITE_ID IS NULL) OR (length(L.SITE_ID) <= 0) OR (L.SITE_ID = '' )))) AND ((((LC.LOG_DATE <= '2012-05-13 13:02:22')))) AND EXISTS ( SELECT SLR.ID
FROM
b_sonet_log_right SLR
INNER JOIN b_user_access UA ON 0=1 OR SLR.GROUP_CODE = 'SA' OR (SLR.GROUP_CODE = 'AU') OR (SLR.GROUP_CODE = 'G2') OR (UA.ACCESS_CODE = SLR.GROUP_CODE AND UA.USER_ID = 419)
WHERE
LC.LOG_ID = SLR.LOG_ID)
ORDER BY
LOG_DATE_X1 ASC 
Время выполнения: 26.47568 сек.

Если пользователь на сайте не авторизован - эти запросы выполняются за несколько секунд. Если авторизован - в момент обращения к этой странице mysql сжирает одно ядро на 100%.

Конфиг mysql:

[client]
port                            = 3306
socket                          = /var/lib/mysqld/mysqld.sock
default-character-set=utf8

[mysqld_safe]
socket                          = /var/lib/mysqld/mysqld.sock
nice                            = 0

[mysqld]
user                            = mysql
max_connections                 = 500
pid-file                        = /var/run/mysqld/mysqld.pid
socket                          = /var/lib/mysqld/mysqld.sock
port                            = 3306
basedir                         = /usr
datadir                         = /var/lib/mysql
tmpdir                          = /tmp
skip-external-locking
query_cache_size                = 256M
table_cache                     = 5120
thread_cache_size               = 32
max_heap_table_size             = 256M
tmp_table_size                  = 512M
innodb_buffer_pool_size         = 2G
innodb_additional_mem_pool_size = 16M
innodb_flush_log_at_trx_commit  = 2
innodb_flush_method             = O_DIRECT
transaction-isolation           = READ-COMMITTED
default-storage-engine          = innodb
#bind-address                   = 127.0.0.1
key_buffer                      = 16M
max_allowed_packet              = 16M
thread_stack                    = 192K
myisam-recover                  = BACKUP
expire_logs_days                = 10
max_binlog_size                 = 100M
join_buffer_size                = 8M
default-character-set           = utf8
character-set-server            = utf8
collation-server                = utf8_unicode_ci
init-connect                    = "SET NAMES utf8"
skip-character-set-client-handshake


open_files_limit = 15360
table_open_cache = 2048
binlog_cache_size = 64M

[mysqldump]
quick
quote-names
max_allowed_packet              = 16M
default-character-set           = utf8

[mysql]

[isamchk]
key_buffer                      = 16M

Прошу помощи в выяснении причины таких тормозов. Проверка/восстановление базы показывают, что все ОК.

 , ,

kir64
()

А есть ли кто из МФИ Софт?

Форум — Talks

Сабж. Может есть кто на ЛОРе из МФИ Софта? Или знакомые там работают?

Собственно, есть пара вопросов касательно трудоустройства.

 , мфи,

kir64
()

[тупняк] redirect 301 htaccess

Форум — General

Здравствуй, ночной лор.

Сложилась такая ситуация, что то ли лыжи не едут, то ли еще чего.

Есть поддомен sub.domain.name

Нужно с него сделать редирект на другой сайт.

В файле .htaccess в директории поддомена пишу:

<IfModule mod_rewrite.c>
        Options +FollowSymLinks
        RewriteEngine On
        Redirect 301 / http://other.site/
</IfModule mod_rewrite.c>

но редиректа не происходит - при обращении к субдомену браузер говорит, что не может отобразить страницу.

Если же сделать Redirect 301 /some http://other.site/, то адрес sub.domain.name/some прекрасно редиректится.

Как сделать, чтоб работало верно?

 

kir64
()

мини-ежедневник: список дел

Форум — Desktop

добрый вечер!

интересует, есть ли под xfce какие-то апплеты для ведения списка дел (как я себе это представляю - на рабочем столе висит что-то типа «липкой бумажки», с пронумерованным списком дел. можно грабить корованы отмечать выполненные задачи, и они будут исчезать/складываться в архив, но перечеркнутые линией. хотя, наверное, это что-то из разряда KDE.), но не перегруженные лишними функциями, типа календаря, контактов, напоминаний и прочего?

также рассматриваются и отдельные приложения, подпадающие по функционалу под мою хотелку.

fedora 15, xfce 4.8

заранее спасибо!

kir64
()

Skype over squid

Форум — Admin

Добрый день!

Столкнулся с такой проблемой, что skype не хочет работать через squid. squid настроен на доступ через связку ip+login/password. Гугление показало, что не я первый, кто с этим столкнулся, тем не менее, советов по устранению проблемы не нашел.

Есть ли на форуме кто-то, кто сталкивался с этой проблемой и решал ее?

kir64
()

Обрыв openvpn-сессии через gnome-nm

Форум — General

Добрый день!

Возникла проблема с openvpn, подключаемым через gnome network-manager.

Имеется 1 стационарник и 1 ноутбук. На стационарном стоит Debian Wheezy, на ноуте Fedora 15. В NM стоит плагин для работы с Ovpn. Добавление впн-подключения делал и там и там через импорт файла *.ovpn.

На ноутбуке при поднятии vpn-сессии через некоторое время теряется интернет, и сам впн, как следствие, тоже отваливается. В настройках маршрутизации стоит галка «Использовать это соединение только для маршрутов в этой сети», чтоб впн не выступал как основное подключение к интернету.

Самое интересно то, что на федоре, не смотря на это, через минуту инет ложится. На дебиане с теми же настройками все работает отлично, «не было ни единого разрыва».

На федоре пробовал поменять настройки, также создавал подключение вручную, а не через импорт - ничего из этого не помогло.

Оба компа работают в одной сети, ноут подключается по wi-fi. Дома при подключении ноута по wi-fi проблема повторяется.

Подскажите, пожалуйста, где еще стоит посмотреть и покопать?

kir64
()

RSS подписка на новые темы