Skip to content

Instantly share code, notes, and snippets.

Lukas Eder lukaseder

Block or report user

Report or block lukaseder

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lukaseder
lukaseder / plsql-vs-bulk-update.sql
Created Sep 26, 2018
PL/SQL row-by-row update vs bulk update
View plsql-vs-bulk-update.sql
-- Copyright Data Geekery GmbH
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
@lukaseder
lukaseder / compilation-error.txt
Created Aug 2, 2018
Average Java generics / type inference compilation error
View compilation-error.txt
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:testCompile (default-testCompile) on project jool: Compilation failure
[ERROR] C:\Users\lukas\workspace\jOOL\jOOL\src\test\java\org\jooq\lambda\TupleTest.java:[225,27] error: no suitable method found for collectors(Collector<Object,CAP#1,Long>,Collector<Object,CAP#2,Optional<Object>>,Collector<Object,CAP#3,Optional<Object>>,Collector<T#1,CAP#4,Optional<T#1>>,Collector<T#2,CAP#5,Optional<T#2>>)
[ERROR] method Tuple.<T#3,A1#1,A2#1,A3#1,A4#1,A5#1,A6#1,A7#1,A8#1,A9#1,A10#1,A11#1,A12#1,A13#1,A14#1,A15#1,A16,D1#1,D2#1,D3#1,D4#1,D5#1,D6#1,D7#1,D8#1,D9#1,D10#1,D11#1,D12#1,D13#1,D14#1,D15#1,D16>collectors(Collector<? super T#3,A1#1,D1#1>,Collector<? super T#3,A2#1,D2#1>,Collector<? super T#3,A3#1,D3#1>,Collector<? super T#3,A4#1,D4#1>,Collector<? super T#3,A5#1,D5#1>,Collector<? super T#3,A6#1,D6#1>,Collector<? super T#3,A7#1,D7#1>,Collector<? super T#3,A8#1,D8#1>,Collector<? super T#3,A9#1,D9#1>,Collector<? super T#3,A10#1,D10#1>,
@lukaseder
lukaseder / BenchmarkUpdate.java
Created Apr 19, 2018
JDBC Benchmark Row-by-row Update (with and without PreparedStatement reuse) vs Batch vs Bulk Update
View BenchmarkUpdate.java
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.time.Duration;
import java.time.Instant;
import java.util.Properties;
@lukaseder
lukaseder / benchmark-update.sql
Created Apr 19, 2018
PL/SQL Benchmark Row-by-row Update vs FORALL vs Bulk Update
View benchmark-update.sql
-- Copyright Data Geekery GmbH
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
@lukaseder
lukaseder / oracle-in-vs-union-all.sql
Created Apr 18, 2018
Oracle OR-connected IN lists vs large UNION ALL query
View oracle-in-vs-union-all.sql
-- Copyright Data Geekery GmbH
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
--
-- http://www.apache.org/licenses/LICENSE-2.0
--
-- Unless required by applicable law or agreed to in writing, software
-- distributed under the License is distributed on an "AS IS" BASIS,
@lukaseder
lukaseder / CallDefaultMethodThroughReflection.java
Created Mar 28, 2018
Correct Reflective Access to Interface Default Methods in Java 8, 9, 10
View CallDefaultMethodThroughReflection.java
// Compile on JDK 9 or 10 with javac -source 1.8 -target 1.8 CallDefaultMethodThroughReflection.java
// Blog post here: https://blog.jooq.org/2018/03/28/correct-reflective-access-to-interface-default-methods-in-java-8-9-10
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodHandles.Lookup;
import java.lang.invoke.MethodType;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;
@lukaseder
lukaseder / Oracle.sql
Created Dec 18, 2017
Benchmarking DBMS_OUTPUT.GET_LINE[S] from PL/SQL
View Oracle.sql
ALTER SYSTEM FLUSH SHARED_POOL;
ALTER SYSTEM FLUSH BUFFER_CACHE;
CREATE TABLE results (stmt NUMBER, i INTERVAL DAY TO SECOND);
DECLARE
v_ts TIMESTAMP WITH TIME ZONE;
v_repeat CONSTANT NUMBER := 50;
v_max CONSTANT NUMBER := 100;
@lukaseder
lukaseder / Oracle.java
Last active Mar 7, 2018
Benchmarking DBMS_OUTPUT.GET_LINE[S] from JDBC
View Oracle.java
import java.sql.Array;
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.Statement;
import java.sql.Types;
import java.util.Properties;
import java.util.stream.LongStream;
import java.util.stream.Stream;
View NullCheck.java
package org.jooq.test.benchmark;
import java.util.ArrayList;
import java.util.List;
import org.openjdk.jmh.annotations.Benchmark;
import org.openjdk.jmh.annotations.Fork;
import org.openjdk.jmh.annotations.Level;
import org.openjdk.jmh.annotations.Measurement;
import org.openjdk.jmh.annotations.Scope;
View sql-developer-not-starting.txt
2016-10-02 19:38:53
Full thread dump Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode):
"Thread-3" #29 daemon prio=5 os_prio=0 tid=0x0000000019574000 nid=0x1964 in Object.wait() [0x000000001d91f000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:502)
at java.util.prefs.AbstractPreferences$EventDispatchThread.run(AbstractPreferences.java:1482)
- locked <0x00000000f65d55a0> (a java.util.LinkedList)
You can’t perform that action at this time.