Questions tagged [large-query]

11 questions
6
votes
2 answers

Out of memory when doing a big query?

I received this error when trying to do big query. java.lang.OutOfMemoryError: Java heap space I've searched and found that applying setAutoCommit(false) and setFetchSize methods to my prepared statement might help handling big query. However, when…
Atthapon Junpun-eak
  • 540
  • 2
  • 11
  • 23
4
votes
1 answer

SQL Server full text search - large query

I'm writing an application in C# using Full Text Search queries in SQL Server 2014. The user needs to be able to search the database using a very large query containing up to 100 000 parameters. For instance: FTS Query: SELECT * FROM Client WHERE…
3
votes
2 answers

Large query increases TempDB

I have huge query on my SQL 2005 Server. This have to be run once everyday but when this query runs temp db grows from 2GB to 48GB. What is the best way top optimize or find the reason why tempdb is growing when this query adds/updates on 80K…
THEn
  • 1,920
  • 3
  • 28
  • 35
3
votes
2 answers

Jquery loading screen to cover a large mysql query via PHP?

I'm in the middle of a reporting tool for my client which basically rebuilds reports on the fly if they are X days old. The issue is that the reports are rebuilt with PHP, and some of them can be pretty big, meaning 20-40 second loading times. At…
Sk446
  • 1,240
  • 3
  • 19
  • 38
2
votes
2 answers

Is UNIX_TIMESTAMP() calculated once for large insert queries?

I've made a test. Here is a innodb table: CREATE TABLE `test_UNIX_TIMESTAMP` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `datefrom` INT(11) NULL DEFAULT NULL, PRIMARY KEY (`id`) ) Here is an insert: insert into test_UNIX_TIMESTAMP (datefrom)…
nikitasius
  • 99
  • 9
1
vote
1 answer

Impala: Is it logical to split a joining query with OR condition into two queries?

I have the below query structure that I am using Impala to perform, that it took over 20 hours and didn't finish: INSERT INTO Final_table with t1 AS (SELECT account_id, request_id, status_1 FROM table_1 WHERE status_1 = "20" ), t2 AS ( SELECT…
Omar AlSaghier
  • 340
  • 4
  • 12
1
vote
1 answer

SQLAlchemy and max_allowed_packet problem

Due to the nature of my application, I need to support fast inserts of large volumes of data into the database. Using executemany() increases performance, but there's a caveat. For example, MySQL has a configuration parameter called…
dpq
  • 9,028
  • 10
  • 49
  • 69
0
votes
1 answer

Select where in () with many items \ IDs is timing out

I have a node JS script which handles large amount of records and compare it to an existing records in database (SQL Server) The NodeJS dynamically construct the query. It fetches data from external source and compare it to my database. Example: I…
Gil Allen
  • 1,169
  • 14
  • 24
0
votes
2 answers

I have a fairly large SQL query that is being slowed by the GROUP BY and ORDER BY statements. What is the best way to optimize?

What is the best way to optimize this query as its taking up to 12 second to execute? Apologies for the size of the query, it executes almost instantly without the group by and order by statements. I'm fairly new to SQL optimization, I've only been…
0
votes
3 answers

Weird JDBC executeQuery exception

I have the following code: public Object RunQuery(String query) throws Exception{ System.out.println("Trying to run query"); Statement stmt = null; ResultSet rs = null; try { stmt = conn.createStatement(); …
Dani
  • 4,267
  • 4
  • 29
  • 37
0
votes
0 answers

Do the underlying JPA JDBC connection can stream?

We have a Java EE application using JPA. User can ask the app to generate some output (big charts, etc) based on results of a large query, so in that case we decided to use directly JDBC and looping over the resultset. We have implemented our code…
moretti.fabio
  • 1,128
  • 13
  • 32