Hacker News new | ask | show | jobs
by philliphaydon 2244 days ago
I haven't touched Oracle in like 12 years so I can't comment on that. But some of the examples are a bit strange or atleast lacking for PostgreSQL.

For example, in the partitioning, he states:

> SELECT * FROM sales_p_america;

But doesn't mention that if you select based on a region, it will use only the partition table.

> SELECT * FROM sales WHERE sales_region IN ('USA','CANADA');

While I believe if you do the equiv in Oracle it wont use the partition table?

---

The section on table inheritance isn't right either.

https://www.postgresql.org/docs/12/tutorial-inheritance.html

What he demonstrated was just a way of making additional tables based on existing ones. While inheritance works sort of like partitioning except the child tables can contain additional data. Selecting from the parent will display all data from the child.

2 comments

Oracle will also use partitioning optimizations in that case. See partition pruning[1].

[1] https://docs.oracle.com/en/database/oracle/oracle-database/1...

Awesome. Thanks for the info. I wasn’t sure if it was supported or not.
Oracle will also use the partitions. Regarding your other input, thanks, I will have a look.