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
View count-asterisk-vs-count-1-oracle.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,
View count-asterisk-vs-count-1-mysql.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 / count-asterisk-vs-count-1-postgres.sql
Created Sep 19, 2019
COUNT(*) vs COUNT(1) in PostgreSQL
View count-asterisk-vs-count-1-postgres.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,
View count-asterisk-vs-count-1-sqlserver.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 / QOM.scala
Last active Sep 18, 2019
A simple proof of concept for a new Query Object Model in Scala, using sealed traits and case classes
View QOM.scala
sealed trait Q {}
trait QField[T] extends Q {}
trait QTable extends Q {}
trait QSchema extends Q {}
trait QCondition extends Q {}
trait QName extends Q {}
trait QQuery extends Q {}
final case class CVal[T](value: T) extends QField[T]
final case class CIdent(name: String) extends QName
@lukaseder
lukaseder / QOM.java
Created Sep 18, 2019
A simple proof of concept for a new Query Object Model in Java, using Immutables annotations
View QOM.java
/*
* This work is dual-licensed
* - under the Apache Software License 2.0 (the "ASL")
* - under the jOOQ License and Maintenance Agreement (the "jOOQ License")
* =============================================================================
* You may choose which license applies to you:
*
* - If you're using this work with Open Source databases, you may choose
* either ASL or jOOQ License.
* - If you're using this work with at least one commercial database, you must
@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,
You can’t perform that action at this time.