Speed up table creation

このコミットが含まれているのは:
Omar Roth 2019-04-10 17:16:18 -05:00
コミット 28d5bedcc7
1個のファイルの変更3行の追加1行の削除

ファイルの表示

@ -501,7 +501,9 @@ end
def analyze_table(db, logger, table_name, struct_type = nil)
# Create table if it doesn't exist
if !db.query_one?("SELECT true FROM information_schema.tables WHERE table_name = $1", table_name, as: Bool)
begin
db.exec("SELECT * FROM #{table_name} LIMIT 0")
rescue ex
logger.write("CREATE TABLE #{table_name}\n")
db.using_connection do |conn|