Infrastructure at your Service

Category Archives: Oracle

Franck Pachot

Postgres vs. Oracle access paths IV – Order By and Index

By | Oracle, Postgres | No Comments

I realize that I’m talking about indexes in Oracle and Postgres, and didn’t mention yet the best website you can find about indexes, with concepts and examples for all RDBMS: http://use-the-index-luke.com. You will probably learn a lot about SQL design. Now let’s continue on execution plans with indexes. As we have seen two posts ago, an index can be used even with a 100% selectivity (all rows), when we don’t filter any rows. Oracle has…

 
Read More
Franck Pachot

Postgres vs. Oracle access paths II – IndexOnlyScan

By | Oracle, Postgres | No Comments

In the previous post I’ve explained a sequential scan by accident: my query needed only one column which was indexed, and I expected to read the index rather than the table. And I had to hint the Oracle example to get the same because the Oracle optimizer chooses the index scan over the table scan in that case. Here is where I learned a big difference between Postgres and Oracle. They both use MVCC to…

 
Read More
Franck Pachot

Oracle Cloud: script to stop all PaaS services

By | Cloud, Oracle | No Comments

With metered cloud services, keeping all your instances running may become expensive. The goal is to start them only when you need them. Here is a script that stops all instances you have on the Oracle Cloud Service PaaS. You can schedule it for example to stop them at the end of the business day, or when they are not active for a long time. The scripts use the REST API called with curl, JSON…

 
Read More
Franck Pachot

Postgres vs. Oracle access paths I – Seq Scan

By | Oracle, Postgres | 5 Comments

Here is the first test I’ve done for my Postgres vs. Oracle access paths series and the first query did a sequential scan. It illustrates the first constant you find in the documentation for the query planner: seq_page_cost (floating point) Sets the planner’s estimate of the cost of a disk page fetch that is part of a series of sequential fetches. The default is 1.0.  

 
Read More
Franck Pachot

Postgres vs. Oracle access paths – intro

By | Oracle, Postgres | 2 Comments

This is the start of a series on PostgreSQL execution plans, access path, join methods, hints and execution statistics. The approach will compare Postgres and Oracle. It is not a comparison to see which one is better, but rather to see what is similar and where the approaches diverge. I have a long experience of reading Oracle execution plans and no experience at all on Postgres. This is my way to learn and share what…

 
Read More