PostgreSQL索引
PostgreSQL提供了好几种索引类型:B-tree, Hash, GiST, SP-GiST和GIN 。B-tree索引也可以用来按照排序顺序检索数据。这并不总是比一个简单的扫描和排序快, 但通常是有帮助的。Hash 索引只能处理简单的等于比较。当一个索引了的列涉及到使用= 操作符进行比较的时候,查询规划器会考虑使用 Hash 索引。GiST 索引不是...
Postgresql 备份恢复
在线备份以及即时恢复(PITR)组合文件系统备份与WAL文件的备份。如果需要恢复,我们就恢复备份, 然后重放备份了的WAL文件,把备份恢复到当前的时间。注意: pg_dump和 pg_dumpall没有产生文件系统级别备份,并且不能作为 连续归档解决方案的一部分。比如备份是符合逻辑的并且不包含 WAL重放使用的足够信息。...
PostgreSQL进程/服务器配置
postgres 20079 1 0 Jul07 ? 00:00:41 /usr/pgsql-9.2/bin/postmaster -p 60904 -D /u01/app/postgres/data/monicrmpostgres 20081 20079 0 Jul07 ? 00:00:00 postgres: logger process &nb...
Rebuild Indexes
-----check INDEX SIZE more than 1 gega bytesSELECT OWNER AS OWNER, SEGMENT_NAME AS SEGMENT_NAME, SEGMENT_TYPE, SUM(BYTES) / 1024 / 1024 AS "SEGMENT_SIZE(M)" FROM DBA_SEGMENTS...
ORA-04031 Unable to allocate xx bytes of shared memory
tetrix03_cafia2odb02alert_tetrix03.logUse ADRCI or Support Workbench to package the incident.See Note 411.1 at My Oracle Support for error and packagingdetails.Errors in file/u01/app/oracle/diag/rdbms/tetrix03_cafia2odb02/tetrix03/trace/tetrix03_smon_14876870.trc:ORA-00604: e...
ORA-00600 memory leak
Case study: http://www.ubtools.com/jira/browse/QA-20https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=122257289878491&parent=DOCUMENT&sourceId=39308.1&id=9316980.8&_afrWindowMode=0&_adf.ctrl-state=sjvx2jrlp_49Investigation: https://dioncho.wordpress.com/2009/06/09/707/...
Forcing Log Switches
Forcing Log SwitchesA log switch occurs when LGWR stops writing to one redo log group and starts writing to another. By default, a log switch occurs automatically when the current redo log file group fills.You can force a log switch to make the currently active group inactive and available for r...
FRA空间满
FRA空间满:1、备份Archivelog,释放空间。2、手工清除Flashback log: alter database flashback off。在数据库open阶段,rvwr进程需要加载闪回日志文件,由于找不到所以无法正常启动,而在关闭flashback后,rvwr进程被关闭,相应的闪回文件也被删除。原因: 刚刚看到闪回日志占用空间太多,直接统计OS命令rm删除,导致...
Flashback
there some ways, one of it flashback table to 5minutes beforeflashback table MyTable to timestamp to_timestamp(sysdate-5/1440) --five minutes agoor you can just query it (not changing table)(flashback query)SELECT * FROM MyTable AS OF TIMESTAMP (sysdate -5 /1440);but these are not ...
MySQL Cluster install on Redhat7
http://dev.mysql.com/downloads/cluster/
Docker
https://docs.docker.com/engine/tutorials/dockerizing/
How to extend the LV size
Add disk size / Resize a partition / Create a partition
TOP 100 long execution query
SELECT DISTINCT TOP 100t.TEXT QueryName,s.execution_count AS ExecutionCount,s.max_elapsed_time AS MaxElapsedTime,ISNULL(s.total_elapsed_time / s.execution_count, 0) AS AvgElapsedTime,s.creation_time AS LogCreatedOn,ISNULL(s.execution_count / DATEDIFF(s, s.creation_time, GET...
如何快速的计算subnet和broadcast
根据IP地址和掩码如何快速计算出子网和广播地址?IP地址:201.222.10.60,掩码:255.255.255.248 计算过程: 256 -248=8 60/8 =7 SUBNET= 7*8 BROADCAST =8*8-1result: SUBNET=201.222.10.56 ...
云相关
https://www.rackspace.com/cloud/sites
WEB API
A Web API Design Methodologyhttps://www.infoq.com/articles/web-api-design-methodology/Article Series: Web APIs: From Start to Finishhttps://www.infoq.com/articles/Web-APIs-From-Start-to-Finish RESTful Web APIs http://restfulwebapis.com
MySQL Storage Engines
http://dev.mysql.com/doc/refman/5.7/en/storage-engines.html16.1 Setting the Storage Engine16.2 The MyISAM Storage Engine 16.3 The MEMORY Storage Engine16.4 The CSV Storage Engine 16.5 The ARCHIVE Storage Engine16.6 The ...
HTTP Method小结(GET,POST.etc)
GET 从指定的url上获取内容POST 提交body中的内容给服务器中指定的url中,属于非幂等的(non-idempotent)请求HEAD 从指定的url上获取header内容(类似Get方式)TRACE Allows a programmer to see how the client's message is modified as it passes through a series of proxy...
DNS查询
ping和host,dig,nslookup是两种不同类型的处理DNS的方式ping,首先会查询本地的/etc/hosts文件,然后才会查询DNS服务器,这样做有啥好处?效率高。host,dig,nslookup三个命令是一样的,不会查询本地的/etc/hosts文件,如果查询DNS服务器没有结果,那么直接返回无结果,此时,即使本地有配置/etc/hosts文件也是没有用...
RHEL7相关--安装/命令
安装linux系统之RHEL7或CENTOS7系统(完整版)http://jingyan.baidu.com/article/c35dbcb0f3565a8916fcbca4.html