Login
Username: Password:
Remember me

[Sign Up] / [Recover Password]

Theme / Language

Popular
New Torrents
new name
Size: 18.40 MB
Most active
new name
S: 74 L: 3
New Posters
SQL TABLE TORRENTS is SLOW
Controls ·  Search New posts · Mark unread

You are in: Forum / Forum / V4 / Support & Suggestions

2021-06-14 08:33:20
coco:
Maybe this line is missing:[mysqld]sql-mode="NO_ENGINE_SUBSTITUTION"
i add it but is still need to reboot enable it ? why
2021-06-14 10:11:53
https://www.youtube.com/watch?v=W1QbeD9cMVY  look here

Indexes


ALTER TABLE `testx`.`torrents` DROP PRIMARY KEY, ADD PRIMARY KEY (`id`) USING BTREE;

Last edited by Extremlym66 on 2021-06-14 10:20:52
2021-06-14 17:59:45
I don’t know what BTREE is so I can’t help there. It’s possible that plug-in or engine is effecting incremental steps, or is duplicating the primary key.

I would not modify indexes or primarily keys with a engine/plug-in that may have unpredictable effects (often experimental) on the tables, general transactions or even the database itself.

My advise is to remove it and go back to stock mariadb install, and import your SQL file into the fresh mariadb install. My table looks nothing like that, and I have 2300 torrents and database relations.. still fast as a bullet.

Not sure what all the MySQL fuss is about lately. 80% of the SQL issues are due to exotic parameters, engine substitutions, config edits.. it should work out of the box without modifying anything in the database!

POLL:
How many of you are using MariaDB? I will write a script that backs up, checks, fixes issues that will cause problems and compile a progress report for saving as document. Your trackers should not be suffering over this.
2021-06-14 21:24:25
You always need to reboot the SQL server to enable my.cnf changes. If you added the line as SUDO, you should only ever have to restart it once
add to the bottom of my.cnf by editing it using sudo nano /etc/mysql/my.cnf
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION

restart mysql server
sudo service mysql restart

TTv3 Micro Edition
Ubuntu 20.04.6 LTS Server
Mysql Version: 10.3.39-MariaDB-0ubuntu0.20.04.2
PHP Version: 7.4.3-4ubuntu2.20
Apache Version: Apache/2.4.59 (Ubuntu)
2021-06-15 02:01:59
For BSD-based systems (root):

# locate my.cnf

or

# edit /usr/local/etc/my.cnf

# service mysql-server restart
2021-07-03 21:02:38
is something from my.cnf theats why is loding slow

innodb=ON
#skip-federated
##skip-pbxt
##skip-pbxt_statistics
#skip-archive
#skip-name-resolve
#old_passwords
back_log = 200
max_connections = 200
key_buffer_size = 32M
myisam_sort_buffer_size = 64M
myisam_max_sort_file_size = 2048M
join_buffer_size = 128K
read_buffer_size = 128K
sort_buffer_size = 256K
table_definition_cache = 8192
table_open_cache = 4096
thread_cache_size = 128
wait_timeout = 1800
connect_timeout = 10
tmp_table_size = 128M
max_heap_table_size = 128M
max_allowed_packet = 2G
#max_seeks_for_key = 4294967295
#group_concat_max_len = 1024
max_length_for_sort_data = 1024
net_buffer_length = 8192
max_connect_errors = 100000
concurrent_insert = 2
read_rnd_buffer_size = 256K
bulk_insert_buffer_size = 8M
# query_cache boost for MariaDB >10.1.2+
# https://community.centminmod.com/posts/30811/
query_cache_limit = 128M
query_cache_size = 128M
query_cache_type = DEMAND
query_cache_min_res_unit = 2K
query_prealloc_size = 262144
query_alloc_block_size = 65536
transaction_alloc_block_size = 8192
transaction_prealloc_size = 4096
default-storage-engine = InnoDB

log_warnings=1
slow_query_log=1
long_query_time=0
log_queries_not_using_indexes =0
slow_query_log_file=/var/lib/mysql/slowq.log
log-error=/var/log/mysqld.log

# innodb settings
innodb_purge_threads = 4
innodb_file_per_table = 1
innodb_open_files = 4000
innodb_data_file_path= ibdata1:10M:autoextend
innodb_buffer_pool_size = 1920M

## https://mariadb.com/kb/en/mariadb/xtradbinnodb-server-system-variables/#innodb_buffer_pool_instances
innodb_buffer_pool_instances=1

innodb_log_files_in_group = 2
innodb_log_file_size = 128M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 2
innodb_thread_concurrency = 20
innodb_lock_wait_timeout=50
innodb_flush_method = O_DIRECT

# 200 * # DISKS
innodb_io_capacity = 2300
innodb_io_capacity_max = 3833
innodb_read_io_threads = 4
innodb_write_io_threads = 4
innodb_flush_neighbors = 1

# mariadb settings
[mariadb]
#thread-handling = pool-of-threads
#thread-pool-size= 20
#mysql --port=3307 --protocol=tcp
#extra-port=3307
#extra-max-connections=1


2021-07-04 20:33:37
I think is just the automated cleanup from admincp that makes your page hang a little and then works until the next cleanup
2021-07-25 18:48:40
finaly i found the problem

 //===| Start Recommended Torrents |===//

///$rec = mysql_query("SELECT id, name, added, image1, seeders, leechers, times_completed FROM torrents WHERE banned ='no' AND visible='yes' AND recommendedx='yes' ORDER BY RAND() LIMIT 5 ");


///if (mysql_num_rows($rec) > 0) {
///print("<table align=center cellpadding=3 cellspacing=3 width=1000px border=0><tr>");
///while ($row2 = mysql_fetch_array($rec)) {
///$tor = $row2['0'];
///$altname = $row2['1'];
///$where = "WHERE banned = 'no' AND visible='yes' AND torrents.id='$tor'";
///$res = mysql_query("SELECT torrents.id, torrents.image1, torrents.image2, torrents.added, torrents.added, torrents.seeders, torrents.leechers, torrents.times_completed, categories.name AS cat_name FROM torrents LEFT JOIN categories ON torrents.category = categories.id $where");
///$row = mysql_fetch_array($res);
///$cat = $row['cat_name'];
///$img1 = "<a href=file.php?id=$row[id] target='_new'><div><img id='cover_img1' class='cover_img' border='0' src='uploads/images/$row[image1]' title=\"$altname | $cat\" width='210px' height='330px'></a></div>
///<div style='margin-top:10px; font-size:13px;'>
///<img src=images/check.png height='14' title='Completed' border=0><font color=#0080FF> <b>".$row['times_completed']."</b></font> |
///<img src=images/arrow_up.gif height='12' title='Seeders' border=0><font color=#00AA00><b>".$row['seeders']."</b></font> |
///<img src=images/arrow_down.gif height='12' title='Leechers' border=0><font color=#FF0000> <b>".$row['leechers']."</b></font>
///</div>";
///if ($row["image1"] != ""){
///print("<td align=center>".$img1."</td>");
///}else{
///    $img1 = "<a href=file.php?id=$row[id]'><img id='cover_img1' class='cover_img' border='0' src='/pic/uploadimage.jpg' title=\"$altname | $cat\" wiidth='210px' height='330px'></a>
///<div style='margin-top:10px; font-size:13px;'>
///<img src=images/check.png height='14' title='Completed' border=0><font color=#0080FF> <b>".$row['times_completed']."</b></font> |
///<img src=images/arrow_up.gif height='12' title='Seeders' border=0><font color=#00AA00><b>".$row['seeders']."</b></font> |
///<img src=images/arrow_down.gif height='12' title='Leechers' border=0><font color=#FF0000> <b>".$row['leechers']."</b></font>
///</div>";
///print("<td align=center>".$img1."</td>");
///}
///}
///print("</tr></table>");
///}
 ///  end_frame();
//===| End Recommended Torrents |===//


where i had this code was verry slow same with similar torrents is something from mariadb 10.3.29
Last edited by Extremlym66 on 2021-07-25 18:49:35
Users online

No users online

Search



Statistics

    Torrents

  • Tracking: 3
  • Todays torrents: 0
  • Seeders: 0
  • Leechers: 0
  • Peers: 0
  • Downloaded: 89.96 GB
  • Uploaded: 9.86 GB

  • Members

  • We have: 838
  • New today: 0
  • Guest today: 9

  • Online

  • Total online: 1
  • Members: 0
  • Guests online: 1
  • Comments: 3
  • Messages: 1,728