Skip to content

Instantly share code, notes, and snippets.

View jonheller1's full-sized avatar

Jon Heller jonheller1

View GitHub Profile
@jonheller1
jonheller1 / Oliver.Clicker
Last active October 21, 2019 23:51
OliverClicker
Let's make a game!
name:My Totally Original Game
Resources
*pie
name:Pie
desc:A yucky pie.
Upgrades
*applePieRecipe
@jonheller1
jonheller1 / Performance benefits of using DATE types when binding date variables for Oracle SQL.sql
Created May 13, 2019 02:52
When passing bind variables it is best to use the native data type. Bind a DATE as a DATE, don't pass in a string and convert it. This test case is for Oracle SQL
/*
This test case shows the performance advantages of binding using the native SQL
data type, instead of passing in a string and converting it.
If the binds use DATE types, then Oracle can better understand the values, better
estimate the number of rows returned (the cardinality), and can choose better
execution plans.
Specifically, using native DATEs allows Oracle to use adaptive cursor sharing, so
that Oracle can create two plans for the same statement. The optimizer can use
@jonheller1
jonheller1 / grant_everything_from_schema_to_user_or_role.sql
Created June 23, 2017 19:50
Grant all access to all objects in a schema to a user or role, for Oracle database.
/*
Purpose: Grant everything in a schema to a specific user or role
How to use: Replace &USER_OR_ROLE and &OWNER with the correct values and run the block.
*/
begin
for grants in
(
--SQL statements.
--CHANGE THE BELOW LINE:
select replace(v_sql, '#USER#', trim(upper('&USER_OR_ROLE'))) v_sql