Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [batch-mode]

The tag has no usage guidance.

1
vote
3answers
47 views

Mysql innodb table dead lock while batch update in multiple thread

I've two tables of innoDB type and I'm updating one table using batch statement from 10 thread (one batch statement per thread) but some time I'm getting dead lock. java.sql.BatchUpdateException: ...
2
votes
1answer
66 views

Does Batch Mode only apply to Agg Functions on ColumnStore Index

Azure SQL Database - Standard Edition (S3 Service Tier) Why does Batch Mode only come into effect when using Aggregate Functions? DROP TABLE IF EXISTS dbo.TransCS CREATE TABLE dbo.TransCS ( ...
0
votes
0answers
25 views

Execute queries in one batch

I have this table which is used to generate second table with the result: SELECT COUNT(*) count, SUM(amount) volume, DATE(created_at) date, DAY(created_at) day, ...
0
votes
3answers
60 views

Generate dynamically data thanks to SQL files (batch)

I am quite new in database so it is possible I missed something. Anyway, I need to execute a test in which I have to simulate a 20years historical data in Postgresql (and TimescaleDB) DB. My problem ...
10
votes
1answer
155 views

Why does batch mode window aggregate yield arithmetic overflow?

The following query performs a windowed SUM over a columnstore table with 1500 total rows, each of which has the value 0 or 1, and it overflows the INT data type. Why is this happening? SELECT a, p, ...
0
votes
1answer
66 views

SQL server tool - backup & restore to different servers different locations

I need to back up 100s of databases and restore them to 20 different servers, and different data file locations for destination servers. Are there any tool that allows me to copy 1 database/all ...
1
vote
3answers
1k views

How to prevent asking for password when creating new database in PostgreSQL 10?

I use the following batch file to create a new database in PostgreSQL 10. echo off cd "C:\Program Files (x86)\PostgreSQL\10\bin" createdb -h localhost -p 5432 -U postgres myDB But it asks to enter ...
2
votes
3answers
2k views

MySQL - Delete table in chunks

I want to cleanup one of my tables which has 4 million. So I prepare this query to clean it. But it's throwing an error, can anyone please help me to fix this? DELIMITER $$ DROP PROCEDURE IF EXISTS ...
0
votes
1answer
124 views

phpMyAdmin how to run an output query? run a batch?

In phpMyAdmin the code below just outputs a list of sql statements for each table: SET @DATABASE_NAME = 'my_db'; SELECT CONCAT('ALTER TABLE `', table_name, '` ENGINE=InnoDB;') AS sql_statements FROM ...
0
votes
1answer
258 views

SQL Server Trigger call count

Is there are way to find how many times trigger is called in a particular session? Our ETL application is inserting records like each row instead of statement (ie) If 100 records are to be inserted I ...
12
votes
1answer
497 views

How to make use of Batch Mode with an UNPIVOT (a loop join)?

I have a query of the following form: SELECT ... FROM ColumnstoreTable cs CROSS APPLY ( SELECT * FROM (VALUES ('A', cs.DataA) , ('B', cs.DataB) , ('C', cs.DataC) ) ...
1
vote
1answer
376 views

How to run db2pd -hadr in batch mode

I am trying to automate some things on DB2 and would like to use a batch file to do this. I create the following batch file test.bat: db2cmd - -w "db2 -tvf test.db2" I then try to do two commands in ...
1
vote
1answer
1k views

Batch for PostgreSQL query

1) The pgpass.conf (of PostgreSQL) is: localhost:5432:*:postgres:mypassword I have no experience with batch and I have spent the day searching in the net. I'm using Windows - if that matters. 2) I ...
7
votes
2answers
1k views

What do the HT* wait types mean? (HTREPARTITION, HTDELETE, …)

A big query is running right now. The result of a batch mode hash join that spills to disk is streamed into a temp table using select into. The query is showing wait types HTDELETE and HTREPARTITION ...
21
votes
1answer
4k views

What exactly can SQL Server 2014 execute in batch mode?

When a columnstore index is being used in a query SQL Server is able to use batch mode. Documentation is thin on what can run in batch mode and what can't. Please look at the following (motivating) ...