ORACLE 的原来设计是基于事务型的,对处理分析型的就不地道了.最近的发展ORACLE相关技术开发都逐步适应OLAP的需求. 1 分区技术 2 压缩技术 3索引组织表 4 大块 5并行技术 6内存结果集. 原来的ORACLE设计基础是短小精悍的大规模并发事务. 而甲骨文凭借这一点占
ORACLE 的原来设计是基于事务型的,对处理分析型的就不地道了.最近的发展ORACLE相关技术开发都逐步适应OLAP的需求.
1 分区技术 2 压缩技术 3索引组织表 4 大块 5并行技术 6内存结果集.
原来的ORACLE设计基础是短小精悍的大规模并发事务. 而甲骨文凭借这一点占领了大部分数据库市场份额.微软的SQLSERVER以它的综合型,友好型和简单易用型占领了中小企业市场.
要设计个ORACLE 10G分析系统,不能选择默认安装法.连机器的存储也不能按OLTP的思维.
基于目前的RAC技术 它是为了OLTP的高可用型而设计的.不适合分析系统的驻留的机器系统. ORACLE 还没有IBM的分库数据库,可以水平无限扩展.
选择一台分析系统的服务器,基本上是RAID0+RAID5+SSD 大内存+多CPU的单台机器.
选择SSD固态硬盘主要是用于分析即时型很强的报表需求. 而RAID0主要存储1个月的数据,这个基本上是很频繁访问的数据报表需求. RAID5或者RAID10等主要存储历史数据了.
大内存主要用于做GROUP BY 运算, 多CPU用户并行查询.
分析系统的分层设计. 分层设计主要是把数据逐步的融缩精华.提供比较多的灵活型.
1 数据同步层, 设置个用户和模式 DATA_synch 主要从各个数据源中获取数据到该用户模式下.表空间 DATA_DAY,DATA_MON,DATA_HIS 三个时间段的空间.
2 数据拆分和汇总. 设置个用户和模式 data_split_sum 主要从源数据提取出部分字段的表,和从中提取时间等粒度的表,或者提取出部分用户的表.
比如活跃用户表
3 报表结果层: data_result 这一层主要存放最终想要的数据.
这三层可以在同一台数据库中,也可以安放在不同的机器上
表空间设计: 分为数据和索引表空间 同时在分为 SSD,RAID0 RAID5空间:ssd_index,ssd_data,raid0_index,raid0_data,raid5_index,raid5_data
注意把重要的表,重要的运算涉及到表,以及即时性要求高的表,领导每天要的表 放在SSD表空间中.
数据同步重要的放进SSD表空间中,其他的不重要的放进RAID0表空间里去. 超过一个月上的数据存进历史表空间.
所有的表要考虑做成索引组织表,因为组织表是有序存放的. SSD还是存放的是日和周级别的重要表,可以采用原来的堆组织表.
RAID0表空间存放当月的数据,因此可以采用非压缩式索引组织表,块空间FREE为0-10 主要看该表的数据更新周期,也就是说稳定时间.比如说该表的数据从外面拖过来后,下一天再拖数据过来要修改前天数据的值.这就是稳定周期.如果硬盘空间有多余的话 可以再设个RAID0_DAY表空间,把那些需要一定时间才稳定下来的表存放此处.等它稳定后才同步到月表空间里去.这样块的FREE可以设置为0.
RAID5空间的表设计 要分区,双分区,压缩,索引组织表,块FREE为0.毕竟这个空间主要存放超过一个月上的历史数据.
最后所有的表的块应该设计为64KB-128KB
开发中使用并行技术 /*+paraller(4)*/
内存表: with _as 共用一张内存数据
拆分数据库中的表除了提取某些字段外, 还经常需要 新增用户,活跃用户,充值用户,购买用户等 有可能结果层统计数据时候要关联很多表造成速度缓慢.
这可以把这几张表做成聚族表.或者是把表做出列.
比如 用户名, 注册时间,第一次充值时间,第一次购买时间,第一次等.
总体来说 1数据量小化,2数据块读取少量化. 包含读取的次数和块的多少.

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA


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

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

Hot Article

Hot Tools

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version
Useful JavaScript development tools

Atom editor mac version download
The most popular open source editor

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software