Thursday, March 14, 2019

Happy Pi Day!

(Borrowed from Connor McDonald's Twitter account.)



SQL> select 2 sum(( 3 4 / (8*(level-1)+1) - 4 2 / (8*(level-1)+4) - 5 1 / (8*(level-1)+5) - 6 1 / (8*(level-1)+6) 7 ) / power(16,level-1)) pi 8 from dual connect by level <= 10; PI ---------- 3.14159265

Sunday, February 17, 2019

"CTEs to no longer be an optimization fence (COMMITED) (git.postgresql.org)"

Saw this linked to on Reddit with the title I quoted in this post's title...

Great news in the world of Postgres: no longer will Common Table Expressions (CTE) be shackled to the evil CTE Optimization Fence! Linky

As I previously blogged about, the optimization fence is a drawback to CTEs in Postgres that in short potentially impacts performance when you use them. So you may use them to make a query neater but you can pay a penalty. If the new commits are all that they promise, this performance hit will be no more! Here's the link to my old post about them - linky - note that they should perform about as well Oracle now!

Sunday, January 06, 2019

Sunday, December 23, 2018

Oracle Oddity

Oracle:

Why do some of the USER_* views such as USER_CONSTRAINTS include the OWNER column, but USER_TAB_COLUMNS does not? The world may never know...

Wednesday, October 10, 2018

Lukas Eder on Why SQL Bind Variables are Important for Performance

Glad to see someone taking up the torch of Tom Kyte's evangelism on using bind variables! My only curiosity is if it's measurably important for performance reasons in other databases such as MySQL. Maybe I ought to test it myself!

https://blog.jooq.org/2018/04/12/why-sql-bind-variables-are-important-for-performance/#comment-245993