The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
0answers
31 views

same query different servers,different execution plan and time

I have this query and it runs less than 2 minutes on Test but on Prod it takes 10 minutes. Both are the same version,CPU,RAM,OS the same. I have four tempdb files on Prod but one one Test. I ...
0
votes
1answer
63 views

Help optimizing very slow mySQL query

I have a query which takes about 6 secs to execute. SELECT * FROM (SELECT ord.ID, op.name AS prodName, op.code, ord.date, ord.email, op.total, stat.ID AS statusID, stat.value AS status, ...
-1
votes
1answer
29 views

60M+ InnoDB table simple query performance HELP

I know it is a repeated question but really need help here. What can I do to improve the performance of this query? Considering that I have no freedom to change system variables/configs :( Thanks in ...
0
votes
0answers
21 views

MariaDB 5.5 vs MySQL 5.7 query optimizers

I have a query that optimizes differently in MariaDB 5.5.37 and MySQL 5.0 and MySQL 5.7. When poorly optimized it takes about 400 seconds to run, but on MySQL 5.7 which optimizes it differently, it ...
0
votes
1answer
49 views

Need help optimizing query to prevent full table scans

I have the following query, which while it works, is also doing a full scan on each left joined table (the log* tables). I thought by using a subquery in the FROM that this would eliminate the ...
4
votes
1answer
76 views

Find the user with closest taste of mine

I trying to write in SQL the following requirement: Each user can rate as much films as they like. (1= I don't like, 5=I love it) And the system should provide to the current user a list of films ...
1
vote
0answers
38 views

Need help in optimizing a Slow Query

I am using userpoints module to provide points for different actions that they do on my site. mysql> desc userpoints; +-------------+---------+------+-----+---------+----------------+ | Field ...
2
votes
2answers
102 views

Optimize a query on two big tables

I have a very important query in my system that is taking too long to execute due to huge amount of data on tables. I'm a junior DBA and i need the best optimization I can get for this. Tables have ...
0
votes
1answer
45 views

How to prepare executon plan for given sql query on a server with 4 processors (Oracle database)

4 processors means the query runs in parallel. Select /*+ parallel(4) */ T1.A FROM T1,T2,T3 WHERE T1.A = T2.A AND T1.B=T3.B AND T1.C=T3.C Tables T1,T2 and T3 have 4,8, and 16 partitions ...
0
votes
1answer
146 views

Why query optimizer doesn't use negative filter index

I have a table that has following structure, as you can see, there are one clustered index and two non-clustered indexes, one non-clustered index is IX_ParentId_Include, and another one is ...
2
votes
1answer
213 views

Most efficent DELETE Method

I must choose between three possible DELETE methods in SQL Server. The table: RawData stays at around 500GB. Here is the table: CREATE TABLE dbo.rawData ( rowId INT IDENTITY PRIMARY KEY, ...
4
votes
1answer
64 views

Logical optimization of joins and selections

I am studying query optimization. I have read that it might be preferred to apply relational selections before a logical join operation. Is there a scenario where joining first and then applying ...
1
vote
0answers
101 views

Truncating Table Partitions Containing Data and Global Indexes

I have to truncate a partition (392,000 records) of a table with 20.000.000 records. At the moment, I'm making a truncate table and rebuilding indexes. But the table has 37 indexes and it takes 20 ...
0
votes
1answer
110 views

sql-server optimize query with lots of null checks

I have a query such as: select something from somewhere join stuff on condition join more_stuff on condition where somewhere.sometime is null and somewhere.someone is null and stuff.whatever is null ...
2
votes
0answers
29 views

Set default fields

Is there a way to inform the database that some fields are default (have always the same value) so that I don't need include them in all my queries? Suppose: Select ... where f1=a, f2=b, f3=c, f4=d ...
1
vote
0answers
55 views

MySQL query with order by decreased performance

Here is my schema: CREATE TABLE `UserMst` ( `UserID` mediumint(8) unsigned NOT NULL AUTO_INCREMENT, `EMailID` varchar(50) DEFAULT NULL, `UserName` varchar(20) DEFAULT NULL, `FullName` ...
0
votes
1answer
54 views

SQL query optmization [closed]

This is one thing I have been trying to read from few days. I am not getting any satisfactory explanation anywhere. Tried surfing some blogs and videos in youtube. Appreciate if anyone one can throw ...