From c90f1522d3384b7e332237f9d324e778fa806777 Mon Sep 17 00:00:00 2001 From: Jacob Quinn Date: Thu, 11 Aug 2022 09:31:36 -0600 Subject: [PATCH] Fix query perf when there are lots of nullable columns. Fixes #343 from suggestion from @xitology --- src/dbinterface.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dbinterface.jl b/src/dbinterface.jl index 950b3df..f1fb8d4 100644 --- a/src/dbinterface.jl +++ b/src/dbinterface.jl @@ -252,7 +252,7 @@ function Cursor(stmt; iterate_rows::Bool=false, ignore_driver_row_count::Bool=fa columnsizes[i] += 1 end end - metadata = [["column name", names...] ["column type", types...] ["sql type", map(x->API.SQL_TYPES[x], sqltypes)...] ["c type", map(x->API.C_TYPES[x], ctypes)...] ["sizes", map(Int, columnsizes)...] ["nullable", map(x->x != API.SQL_NO_NULLS, nullables)...] ["long data", longtexts...]] + metadata = [Any["column name", names...] Any["column type", types...] Any["sql type", map(x->API.SQL_TYPES[x], sqltypes)...] Any["c type", map(x->API.C_TYPES[x], ctypes)...] Any["sizes", map(Int, columnsizes)...] Any["nullable", map(x->x != API.SQL_NO_NULLS, nullables)...] Any["long data", longtexts...]] columnar = knownlength = true if any(longtexts) || rows <= 0 || iterate_rows || ignore_driver_row_count rowset = 1