问题:
MariaDB [fltpricedb]> select count(id) from fdflightcabinpricedetail;
ERROR 1104 (42000): The SELECT would examine more than MAX_JOIN_SIZE rows; check your WHERE and use SET SQL_BIG_SELECTS=1 or SET MAX_JOIN_SIZE=# if the SELECT is okay
MariaDB [fltpricedb]> SET SQL_BIG_SELECTS=1;
Query OK, 0 rows affected (0.00 sec)
MariaDB [fltpricedb]> select count(id) from fdflightcabinpricedetail;
+-----------+
| count(id) |
+-----------+
| 11491064 |
+-----------+
1 row in set (2.50 sec)
思路:
#/data/mysql/bin/my_print_defaults --mysqld
--lower_case_table_names=1
--port=33107
--socket=/data/mysql/mysql.sock
--pid-file=/data/mysql/db01.zp.com.pid
--basedir=/data/mysql/
--datadir=/data/mysql/data
--tmpdir=/data/mysql/tmp
--character-set-server=utf8
--default-storage-engine=INNODB
--sql-mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
--table_open_cache=2000
--open_files_limit=65535
--sort_buffer_size=2M
--thread_cache_size=300
--tmp_table_size=256M
--key_buffer_size=2048M
--read_buffer_size=1M
--read_rnd_buffer_size=16M
--query_cache_type=0
--query_cache_size=20M
--query_cache_limit=0M
--skip-name-resolve
--skip-host-cache
--skip-external-locking
--init_connect=SET autocommit = 0
--init_connect=SET NAMES utf8
--init_connect=SET character_set_client = utf8
--init_connect=SET character_set_results = utf8
--init_connect=SET character_set_connection = utf8
--skip-character-set-client-handshake
--wait_timeout=10
--max_allowed_packet=64M
--max_connections=1200
--max_connect_errors=6000
--event_scheduler=ON
--general_log=0
--general_log_file=/data/mysql/mysql_logs/mysql.log
--log-output=file
--log_warnings=2
--back_log=1500
--server_id=1010
--binlog-format=ROW
--log-output=file
--log-bin=/data/mysql/mysql_logs/binary_log/mysqldb01-bin
--log-bin-index=/data/mysql/mysql_logs/binary_log/mysqldb01-bin.index
--binlog_cache_size=4M
--max_binlog_size=100M
--max_binlog_cache_size=512m
--expire_logs_days=10
--binlog-checksum=CRC32
--master-verify-checksum=1
--slave-sql-ver
max_join_size报错
最新推荐文章于 2022-09-05 16:42:12 发布
当尝试执行大型JOIN查询时,遇到了MySQL的MAX_JOIN_SIZE错误。通过设置SQL_BIG_SELECTS=1可以临时解决,但问题根源在于启动脚本、my.cnf配置文件或用户配置。检查发现用户配置文件中的绑定IP导致了限制,移除特定参数后问题解决。
摘要由CSDN通过智能技术生成