Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Оптимизация] В окне поиска обращение к sqlite выполнять на ownerDraw #1097

Closed
pavel-pimenov opened this issue Aug 24, 2015 · 1 comment

Comments

@pavel-pimenov
Copy link
Owner

From Pavel.Pimenov@gmail.com on June 10, 2013 21:48:25

  1. Включил мониторинг обращения к базе. (FlylinkDC.exe /sqltrace)
  2. В логе sqltrace.log обнаружилось, что для всех файлов найденных поиском выполняется последовательность команд вида:
    хотя они нужны только в момент отрисовки.
    При не точных запросах вида dvdrip или mkv это создает лишнюю нагрузку на базу данных.

[2013-06-10 23:42:31] select (select name from fly_dic where id = dic_location),
flag_index from fly_location_ip where start_ip <= 1423565421 and stop_ip > 1423565421
[2013-06-10 23:42:31] select (select name from fly_dic where id=country), flag_index from fly_country_ip where start_ip <= 1423565421 order by start_ip desc limit 1
[2013-06-10 23:42:31] select 1 from fly_tth where tth=x'fcf0b3cb9daf0100bdf6888ce57d5b6f78f6c1338ea1289b'
union all
select 2 from fly_hash where tth=x'fcf0b3cb9daf0100bdf6888ce57d5b6f78f6c1338ea1289b'
[2013-06-10 23:42:31] select 1 from fly_tth where tth=x'8cf94daaf8acfc8f79d0f374c27740681cbe30c47ec92fcb'
union all
select 2 from fly_hash where tth=x'8cf94daaf8acfc8f79d0f374c27740681cbe30c47ec92fcb'
[2013-06-10 23:42:31] select (select name from fly_dic where id = dic_location),
flag_index from fly_location_ip where start_ip <= 1423565421 and stop_ip > 1423565421
[2013-06-10 23:42:31] select (select name from fly_dic where id=country), flag_index from fly_country_ip where start_ip <= 1423565421 order by start_ip desc limit 1
[2013-06-10 23:42:31] select 1 from fly_tth where tth=x'8cf94daaf8acfc8f79d0f374c27740681cbe30c47ec92fcb'
union all
select 2 from fly_hash where tth=x'8cf94daaf8acfc8f79d0f374c27740681cbe30c47ec92fcb'
[2013-06-10 23:42:31] select 1 from fly_tth where tth=x'528a224c4726d8b46e2e674ae05a62fb7469a8586476d01f'
union all
select 2 from fly_hash where tth=x'528a224c4726d8b46e2e674ae05a62fb7469a8586476d01f'
[2013-06-10 23:42:31] select (select name from fly_dic where id = dic_location),
flag_index from fly_location_ip where start_ip <= 3162919515 and stop_ip > 3162919515
[2013-06-10 23:42:31] select 1 from fly_tth where tth=x'528a224c4726d8b46e2e674ae05a62fb7469a8586476d01f'

Original issue: http://code.google.com/p/flylinkdc/issues/detail?id=1060

@pavel-pimenov
Copy link
Owner Author

From Pavel.Pimenov@gmail.com on June 11, 2013 07:09:02

This issue was closed by revision r14171 .

Status: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant