sql-optimization Questions

3

Solved

I want to select records from '2013-04-01 00:00:00' to 'today' but, each day has lot of value, because they are saving each 15 minutes a value, so I want only the first or last value from each day....
Slut asked 10/5, 2013 at 10:28

14

Solved

I have a large data table. There are 10 million records in this table. What is the best way for this query Delete LargeTable where readTime < dateadd(MONTH,-7,GETDATE())
Egmont asked 13/6, 2014 at 20:22

1

Solved

Though it may sound like a stupid question, sometimes it is necessary to show page numbers (and also the last page). What is the best way to calculate total row counts and also calculate page numbe...

1

I am new to Spark-SQL to read Hive tables. I want to know that how does Spark performs a multi-table Join. I read somewhere that it is recommended to always keep the largest table on the top of the...
Allenaallenby asked 20/6, 2020 at 17:47

2

Solved

I was optimising a query on SQL Server and ran into something I was not expecting. There is a table tblEvent in the database, among other columns it has IntegrationEventStateId and ModifiedDateUtc....
Coccidioidomycosis asked 28/3, 2020 at 0:21

1

We have a performance issue with a specific SQL query and we're trying to figure out how could we improve here. It's execution time on is about 20 - 100 seconds! Here is the query and it's explain...
Loyal asked 4/6, 2019 at 10:19

8

Solved

I have the following database (simplified): CREATE TABLE `tracking` ( `id` int(11) NOT NULL AUTO_INCREMENT, `manufacture` varchar(100) NOT NULL, `date_last_activity` datetime NOT NULL, `date_c...
Miner asked 14/8, 2018 at 16:33

13

Solved

I have the following query: SELECT analytics.source AS referrer, COUNT(analytics.id) AS frequency, SUM(IF(transactions.status = 'COMPLETED', 1, 0)) AS sales FROM analytics LEFT JOIN transact...

1

Solved

I'm exploring ways of improving the performance of an application which I can only affect on the database level to a limited degree. The SQL Server version is 2012 SP2 and the table and view struct...
Eupatorium asked 9/6, 2015 at 14:3

1

Solved

Can I set Microsoft SQL Server 2012 options such as ARITHABORT programmatically from a (remote) Java client that uses Microsoft JDBC Driver 4.0? I've noticed that statement.execute("SET ARITHABORT ...
Lupelupee asked 26/10, 2014 at 9:16

4

Solved

there are a lot of questions about Recursive SELECT query in Mysql, but most of answers is that "There NO solution for Recursive SELECT query in Mysql". Actually there is a certain solution & ...
Zymometer asked 14/5, 2013 at 11:29

2

I have to update many columns in many rows in PostgreSQL 9.1. I'm currently doing it with many different UPDATE queries, each one that works on a different row (based on the primary key): UPDATE m...
Immaterial asked 21/9, 2013 at 19:48

1

Solved

I know this kind questions has been posted here many times, for exmaple: Java way I have huge amount of data (150k+) in standard tree pattern (id, parent_id, some_data) Question: How to get leav...
Garris asked 9/10, 2012 at 8:44

7

Solved

Can we get a list of basic optimization techniques going (anything from modeling to querying, creating indexes, views to query optimization). It would be nice to have a list of these, one technique...
Ruffle asked 25/4, 2010 at 21:18

9

Solved

In T-SQL what's faster? DELETE * FROM ... WHERE A IN (x,y,z) Or DELETE * FROM ... WHERE A = x OR A = y OR A = z In my case x, y and z are input parameters for the stored procedure. And I'm tr...
Integumentary asked 13/7, 2009 at 14:32
1

© 2022 - 2024 — McMap. All rights reserved.