ORACLE 分析系统OLAP设计思想
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数据块读取少量化. 包含读取的次数和块的多少.

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

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics











Solutions to Oracle cannot be opened include: 1. Start the database service; 2. Start the listener; 3. Check port conflicts; 4. Set environment variables correctly; 5. Make sure the firewall or antivirus software does not block the connection; 6. Check whether the server is closed; 7. Use RMAN to recover corrupt files; 8. Check whether the TNS service name is correct; 9. Check network connection; 10. Reinstall Oracle software.

The method to solve the Oracle cursor closure problem includes: explicitly closing the cursor using the CLOSE statement. Declare the cursor in the FOR UPDATE clause so that it automatically closes after the scope is ended. Declare the cursor in the USING clause so that it automatically closes when the associated PL/SQL variable is closed. Use exception handling to ensure that the cursor is closed in any exception situation. Use the connection pool to automatically close the cursor. Disable automatic submission and delay cursor closing.

In Oracle, the FOR LOOP loop can create cursors dynamically. The steps are: 1. Define the cursor type; 2. Create the loop; 3. Create the cursor dynamically; 4. Execute the cursor; 5. Close the cursor. Example: A cursor can be created cycle-by-circuit to display the names and salaries of the top 10 employees.

Oracle views can be exported through the EXP utility: Log in to the Oracle database. Start the EXP utility, specifying the view name and export directory. Enter export parameters, including target mode, file format, and tablespace. Start exporting. Verify the export using the impdp utility.

When Oracle log files are full, the following solutions can be adopted: 1) Clean old log files; 2) Increase the log file size; 3) Increase the log file group; 4) Set up automatic log management; 5) Reinitialize the database. Before implementing any solution, it is recommended to back up the database to prevent data loss.

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

Building a Hadoop Distributed File System (HDFS) on a CentOS system requires multiple steps. This article provides a brief configuration guide. 1. Prepare to install JDK in the early stage: Install JavaDevelopmentKit (JDK) on all nodes, and the version must be compatible with Hadoop. The installation package can be downloaded from the Oracle official website. Environment variable configuration: Edit /etc/profile file, set Java and Hadoop environment variables, so that the system can find the installation path of JDK and Hadoop. 2. Security configuration: SSH password-free login to generate SSH key: Use the ssh-keygen command on each node

To stop an Oracle database, perform the following steps: 1. Connect to the database; 2. Shutdown immediately; 3. Shutdown abort completely.
