Home Database Mysql Tutorial CMS不要让MySQL为你流泪

CMS不要让MySQL为你流泪

Jun 07, 2016 pm 06:00 PM
cms mysql

MySQL是中小型网站普遍使用的数据库之一,然而,很多人并不清楚MySQL到底能支持多大的数据量,再加上某些国内CMS厂商把数据承载量的责任推给它,导致很多不了解MySQL的站长对它产生了很多误解

那么,MySQL的数据量到底能支持多少呢?其实MySQL单表的上限,主要与操作系统支持的最大文件大小有关。我们来看一下官方的介绍。
1.4.4. MySQL表最大能达到多少
MySQL 3.22限制的表大小为4GB。由于在MySQL 3.23中使用了MyISAM存储引擎,最大表尺寸增加到了65536TB(2567 – 1字节)。由于允许的表尺寸更大,MySQL数据库的最大有效表尺寸通常是由操作系统对文件大小的限制决定的,而不是由MySQL内部限制决定的。
InnoDB存储引擎将InnoDB表保存在一个表空间内,该表空间可由数个文件创建。这样,表的大小就能超过单独文件的最大容量。表空间可包括原始磁盘分区,从而使得很大的表成为可能。表空间的最大容量为64TB。
在下面的表格中,列出了一些关于操作系统文件大小限制的示例。这仅是初步指南,并不是最终的。要想了解最新信息,请参阅关于操作系统的文档。
MySQL表最大能达到多少:http://dev.mysql.com/doc/refman/5.1/zh/introduction.html#table-size
事实上MySQL能承受的数据量的多少主要和数据表的结构有关,并不是一个固定的数值。表的结构简单,则能承受的数据量相对比结构复杂时大些。
据D.V.B团队以及Cmshelp团队做CMS系统评测时的结果看来,MySQL单表一般在2千万条记录(4G)下能够良好运行,经过数据库的优化后5千万条记录(10G)下运行良好。那么为什么国内的某些CMS厂商还会把其产品自身负载差的责任推给MySQL呢?
这对于MySQL是不公平的,那些CMS厂商非但没有把内核做好反而还在添加很多花哨的功能,最终导致其产品自身负载过低。他们并没有针对自身负载效果作出相应的数据库优化方案及标准,而是继续保留着复杂的结构造成对MySQL的资源无休止的浪费,最终导致了其负载上的缺陷,于是他们便充分发挥中国人的传统优势——变通:避重就轻的采用了所谓的分表式存储,虽然在一定程度上缓解了自身负载的缺陷,但是导致了网站后期维护以及资源上的浪费,这样做是否是长久之计呢?虽然他们解决了眼前的问题,但以后呢?难道想无休止的分表来达到目的?MYLB.NET.CN博主追峰用一个不恰当的比喻来形容,MySQL中的的表就像一块地,单表就相当于利用这块地盖高层建筑充分利用达到高人员负载,但分表就相当于用这块地盖了一间平房,如果为了达到高人员负载的话那就需要另开地皮达到目的,但是我们要思考,是地不够,还是他的能力不够,如此做法让人感到资源的浪费以及规划的严重缺陷。那么对于这样的CMS系统,有谁敢用?难道为了达到让其良好的运行而无休止的更换着服务器配置么?况且大多情况下一台服务器中不是只有这么一个网站,那么我们就要思考,我们的腰包是否是为了满足这么庞大的小CMS而生。
对于某些CMS厂商,MYLB.NET.CN博主追峰只能说其把负载问题推到MySQL身上的做法是极其不负责任的行为,分表的做法是避重就轻毫无责任感的做法,这不仅是对自己的不负责,更是对其用户的不负责行为,难道你想用把责任推给MySQL以及分表的做法来掩饰自己产品的不足么?大错特错,你的这种做法只能愚弄那些刚接触网站系统对于源码以及数据库不大了解的初级站长,但是对于大多圈内人士你是无法欺骗的;建议这类厂商还是把到各群和网站挑拨是非、夸大宣传、诋毁他人的时间多多利用到如何改善自己产品让用户更好的获益上;因为不管多初级的站长也会有成为老站长对源码和数据库驾轻就熟的时候,到那时看清你们本质的人会更多。
如此毫无责任感可言的CMS厂商会有多少用户会忠实于你呢?对自己的产品都没有责任感,那么对待用户还剩下多少呢?还有谁敢去选择你们的产品呢?
这样不思进取,说一套做一套了,吹嘘自己的行为只能是把自己生生地捧得很高,但是别忘了,你的高度是自己吹上去的,用户才是真正的评论者,到时候你们会摔到什么程度那就要自己思考了。感谢大家对MYLB.NET.CN的支持。
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

MySQL's Place: Databases and Programming MySQL's Place: Databases and Programming Apr 13, 2025 am 12:18 AM

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

How to connect to the database of apache How to connect to the database of apache Apr 13, 2025 pm 01:03 PM

Apache connects to a database requires the following steps: Install the database driver. Configure the web.xml file to create a connection pool. Create a JDBC data source and specify the connection settings. Use the JDBC API to access the database from Java code, including getting connections, creating statements, binding parameters, executing queries or updates, and processing results.

How to start mysql by docker How to start mysql by docker Apr 15, 2025 pm 12:09 PM

The process of starting MySQL in Docker consists of the following steps: Pull the MySQL image to create and start the container, set the root user password, and map the port verification connection Create the database and the user grants all permissions to the database

MySQL's Role: Databases in Web Applications MySQL's Role: Databases in Web Applications Apr 17, 2025 am 12:23 AM

The main role of MySQL in web applications is to store and manage data. 1.MySQL efficiently processes user information, product catalogs, transaction records and other data. 2. Through SQL query, developers can extract information from the database to generate dynamic content. 3.MySQL works based on the client-server model to ensure acceptable query speed.

Laravel Introduction Example Laravel Introduction Example Apr 18, 2025 pm 12:45 PM

Laravel is a PHP framework for easy building of web applications. It provides a range of powerful features including: Installation: Install the Laravel CLI globally with Composer and create applications in the project directory. Routing: Define the relationship between the URL and the handler in routes/web.php. View: Create a view in resources/views to render the application's interface. Database Integration: Provides out-of-the-box integration with databases such as MySQL and uses migration to create and modify tables. Model and Controller: The model represents the database entity and the controller processes HTTP requests.

How to install mysql in centos7 How to install mysql in centos7 Apr 14, 2025 pm 08:30 PM

The key to installing MySQL elegantly is to add the official MySQL repository. The specific steps are as follows: Download the MySQL official GPG key to prevent phishing attacks. Add MySQL repository file: rpm -Uvh https://dev.mysql.com/get/mysql80-community-release-el7-3.noarch.rpm Update yum repository cache: yum update installation MySQL: yum install mysql-server startup MySQL service: systemctl start mysqld set up booting

See all articles