Thanks for the link Pavel, that makes perfect sense now.
Teddy ________________________________ From: David G. Johnston <david.g.johns...@gmail.com> Sent: Thursday, February 16, 2017 12:42:36 PM To: Teddy Schmitz Cc: pgsql-general@postgresql.org Subject: [GENERAL] Problems with Greatest On Wednesday, February 15, 2017, Teddy Schmitz <teddy.schm...@actuallywedo.com<javascript:_e(%7B%7D,'cvml','teddy.schm...@actuallywedo.com');>> wrote: select greatest(max(t1.id), max(t2.id)) from t1, t2; I seriously doubt that the greatest function is a larger contributor to run time than the cross join between t1 and t2. David J.