Questions tagged [query-tuning]

123 questions
0
votes
1 answer

Indexes for a large MYSQL table

hope you will allow me to pick your brains so I can gain some knowledge in the process. We have 3 tables - data_product, data_issuer, data_accountbalance CREATE TABLE `data_issuer` ( `id` int(11) NOT NULL AUTO_INCREMENT, `issuer_name` varchar(128)…
Gayathri
  • 274
  • 3
  • 17
0
votes
0 answers

how to improve the performance UNION ALL WITH ORDER BY

table A has billions of data and table B have very less amount of records. we are fetching union all of A and B using UNION ALL. when we do sort by on top of view query, it took a long time to fetch the records do u have any idea how we can improve…
0
votes
2 answers

SQL Server investigating time out error

I've been tasked with investigating timeout error for an existing ETL. I would like to access logs of previous ETL run to identify where the timeout occurs. The ETL sits on Azure and one task keeps failing. The task that keeps failing, effectively…
Sharingan
  • 333
  • 5
  • 19
0
votes
1 answer

Oracle database help optimizing LIKE searches

I am on Oracle 11g and we have these 3 core tables: Customer - CUSTOMERID|DOB CustomerName - CUSTOMERNAMEID|CustomerID|FNAME|LNAME Address - ADDRESSID|CUSTOMERID|STREET|CITY|STATE|POSTALCODE I have about 60 million rows on each of the tables and…
user3726933
  • 329
  • 2
  • 17
0
votes
3 answers

What is wrong with this stored procedure?

I need to do tuning on this sp: alter PROCEDURE Gaming.usp_DB_GetGameResultsByDateTime (@FromDateTime AS DATETIME2(7) = null , @ToDateTime AS DATETIME2(7) = null) AS DECLARE @FromDateTime_Actual AS DATETIME2(7) , …
dani
  • 17
  • 2
0
votes
0 answers

Sql Server - BIG DATA (horizontal scaling table)

everyone. I have a table called "Files" that has almost 100 million of rows. My question is how can I improve my performance when try to search into this table. Actually, I'm using "FullText Index" to search on it. One of the ideas was to split my…
0
votes
1 answer

Using xdmp:plan in MarkLogic

I wanted to compare two queries: 1) xdmp:plan(fn:distinct-values(/ts:top-song/ts:genres/ts:genre/text(), "http://marklogic.com/collation/en/S1/AS/T00BB")) 2) declare variable $options :=
Yash
  • 510
  • 2
  • 6
  • 14
0
votes
0 answers

Performance of inner join on two tables with large data

JOIN query on below table which contains large amount of data. This executes very slow with java jdbc and jpa. Use case UI has an option to select list of traders,category and date range.If i select 1 week date range and all traders from dropdown,…
user5303259
  • 27
  • 3
  • 9
0
votes
0 answers

Optimizing the hive query :Apache Hive

The following hive query which finds the lead and lag on a single column. The query spawns 1 Mapper and 50 Reducers. How can i optimize the query to spawn less reduces. Table description col_name data_type comment # col_name …
wandermonk
  • 6,856
  • 6
  • 43
  • 93
0
votes
2 answers

Query temp space limit in Oracle

I want to run a query which takes a lot of temp space. However, I don't want the query to exhaust all the available temp space. How can this be achieved?
Arc
  • 1,680
  • 6
  • 30
  • 57
0
votes
0 answers

Query Performance Teradata

SELECT SBSCRPN_KEY, DAILY_DT_KEY, BAL_EXPRY_DT_KEY, RANK() OVER(PARTITION BY SBSCRPN_KEY ORDER BY DAILY_DT_KEY DESC) AS ROW_NUM FROM DT_SDMVW.FCT_SBSCRPN_BAL_DAILY WHERE DAILY_DT_KEY <= '2017-03-29' QUALIFY ROW_NUM <=2 This query takes…
0
votes
1 answer

Tuning in large queries in SQL Server

I am new to SQL Server, though have spent sufficient time in Oracle databases. In the current application I am managing contains a lot of denormalized staging tables to receive upstream data. Views have been created on staging tables each consisting…
Yavnica Saini
  • 33
  • 1
  • 1
  • 8
0
votes
0 answers

Need help in tuning Group by cube with 6 columns

I want to aggregate data from table1 in all possible combinations of the 6 columns. Table1 has 60Million rows in it. The query is running for more than an hour and still not fetching any data. Need some help in tuning this select /*+…
Soumya7oct
  • 13
  • 5
0
votes
1 answer

How can I optimize a loop, which is calling an object in Oracle?

Below is the code which needs optimization. for i in 1 .. p_in_util_data_list(j).factlist.count LOOP SELECT count(*) INTO v_non_factor_exists FROM engine_usage_factors WHERE usage_month =…
CodERORR
  • 19
  • 4
0
votes
1 answer

suggest a alternate query to improve the performance?

SELECT B.tblBooking_id, F.M_Merged_CustomerId, B.depart_date, B.cancellation, B.booking_num, B.end_date, B.date_booked, B.booking_price, B.tblBooking_Id as SOURCE_RES_ID , B.agentid, B.is_insert_date, B.is_update_date…
1 2 3
8 9