这次我有幸参加了51CTO举办的2013年大数据峰会,这次大会的主题是大数据的运维(第一天)以及大数据的分析(第二天)。大数据到底是啥意思呢?从字眼上就是很多
这次我有幸参加了51CTO举办的2013年大数据峰会,这次大会的主题是大数据的运维(第一天)以及大数据的分析(第二天)。
大数据到底是啥意思呢?从字眼上就是很多很大量的数据,可以叫做海量数据。
当数据很小时,你可以用一台机器顶住数据访问压力,再大时你可以加内存换SSD硬盘,或者采购性能很强劲的小型机,通过硬件去解决。
从架构层出发,于是就发展到了读写分离,同时有多台Slave备机提供读取业务,这样就降低了数据库的负载。
随着数据的增长,发现依靠读写分离也解决不了高负荷高并发的访问,Slave备机延时很大,于是又发展到了对表的水平切分,依靠表的主键取模,把数据平均分散到不同的小表,再分布到各台机器上,可以看做是迁移数据,我之前写过《一篇用户信息表水平切分》的博文,有兴趣的可以去访问:
但这个有一个弊端,就是开发需要更改他们的代码,增加路由访问策略,要知道每张小表是分布到哪台机器上,对开发人员并不是透明的,而对于DBA来说,每次都需要通过手工去拆分,比较繁琐。
下面就进入了会议的正题,首先是新浪微博,他们的解决方案是通过数据库前端CACHE层,用redis做缓存,采用nosql型数据库(非传统关系型数据库),降低数据库的负载。他们没有采用memcache,是考虑到数据可以持久化的保存在磁盘上,解决了服务重启后数据不丢失的问题,免备案空间,且存储的数据类型较多。
下面是淘宝,虚拟主机,他们的开源软件Oceanbase海量数据平台(数据库中间件),其原理也是通过对主键的取模,香港虚拟主机,把一张大表拆分成N张小表并存储到各台服务器上,前端应用访问海量平台,经过海量平台处理,把请求发送到后端MySQL数据库上,MySQL完成数据查询,再经过中间件,将结果送回客户端。这样对开发来说是透明的,代码层加上API接口,开发不需要知道每张小表具体放在哪台服务器上,DBA也减少了繁琐的水平拆表的工作。
目前应用在收藏夹、直通车报表、天猫评价等OLTP和OLAP在线业务,线上数据量已经超过一千亿条。
更多介绍请参考官网:
第二天,主要介绍了数据分析与挖掘,当数据总量将达到1.8万亿GB,对这些海量数据的分析已经成为一个非常重要且紧迫的需求。Hadoop基于MapReduce在可伸缩性、健壮性、计算性能和成本上具有无可替代的优势,目前已成为当前互联网企业主流的大数据分析平台。
目前淘宝,百度,暴风影音,360安全卫士都采用hadoop做海量数据分析。
关键词:MySQL、nosql、hadoop已成为当今互联网行业最流行、最前端的技术。
本文出自 “贺春旸的技术专栏” 博客,请务必保留此出处

ACID attributes include atomicity, consistency, isolation and durability, and are the cornerstone of database design. 1. Atomicity ensures that the transaction is either completely successful or completely failed. 2. Consistency ensures that the database remains consistent before and after a transaction. 3. Isolation ensures that transactions do not interfere with each other. 4. Persistence ensures that data is permanently saved after transaction submission.

MySQL is not only a database management system (DBMS) but also closely related to programming languages. 1) As a DBMS, MySQL is used to store, organize and retrieve data, and optimizing indexes can improve query performance. 2) Combining SQL with programming languages, embedded in Python, using ORM tools such as SQLAlchemy can simplify operations. 3) Performance optimization includes indexing, querying, caching, library and table division and transaction management.

MySQL uses SQL commands to manage data. 1. Basic commands include SELECT, INSERT, UPDATE and DELETE. 2. Advanced usage involves JOIN, subquery and aggregate functions. 3. Common errors include syntax, logic and performance issues. 4. Optimization tips include using indexes, avoiding SELECT* and using LIMIT.

MySQL is an efficient relational database management system suitable for storing and managing data. Its advantages include high-performance queries, flexible transaction processing and rich data types. In practical applications, MySQL is often used in e-commerce platforms, social networks and content management systems, but attention should be paid to performance optimization, data security and scalability.

The relationship between SQL and MySQL is the relationship between standard languages and specific implementations. 1.SQL is a standard language used to manage and operate relational databases, allowing data addition, deletion, modification and query. 2.MySQL is a specific database management system that uses SQL as its operating language and provides efficient data storage and management.

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

Key metrics for EXPLAIN commands include type, key, rows, and Extra. 1) The type reflects the access type of the query. The higher the value, the higher the efficiency, such as const is better than ALL. 2) The key displays the index used, and NULL indicates no index. 3) rows estimates the number of scanned rows, affecting query performance. 4) Extra provides additional information, such as Usingfilesort prompts that it needs to be optimized.

Usingtemporary indicates that the need to create temporary tables in MySQL queries, which are commonly found in ORDERBY using DISTINCT, GROUPBY, or non-indexed columns. You can avoid the occurrence of indexes and rewrite queries and improve query performance. Specifically, when Usingtemporary appears in EXPLAIN output, it means that MySQL needs to create temporary tables to handle queries. This usually occurs when: 1) deduplication or grouping when using DISTINCT or GROUPBY; 2) sort when ORDERBY contains non-index columns; 3) use complex subquery or join operations. Optimization methods include: 1) ORDERBY and GROUPB


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

Zend Studio 13.0.1
Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download
The most popular open source editor