All Questions

Filter by
Sorted by
Tagged with
3
votes
1answer
534 views

Postgres occasionally slow to query

I'm running a database with a few tables with large row counts (millions) but which are fairly small in data size. All the tables are append-only, so no deletes or updates ever happening, around 250 ...
7
votes
1answer
139 views

Strange optimisation effect using WITH construction

I have 4 tables, let's name them as: table A, 15M rows table B, 40K rows, table C, 30K rows, table D, 25M rows (kk - means millions) and I had a legacy query, which was constructed like this: ...
3
votes
1answer
5k views

Simple queries to Redshift really slow

I just started testing AWS Redshift and populated a single node with the AWS sample data. Querying a table with 10 or ~400 rows takes around 2 seconds, uncached. I'm not sure if I'm misunderstanding ...
1
vote
1answer
5k views

How to change query_cache_type to 2 in AWS RDS?

I want to change my AWS RDS parameter query_cache_type value to 2 , I have done it in parameter group dashboard as in the given image. I have also restarted my mySQL server with the changed parameter,...
2
votes
2answers
885 views

How to optimize query on MYSQL with multiple group by clause

I have a web application where users can view data of performance. There will be around 200 to 250 users. Each user will have like 100,000 rows of data per day. It is only table and here is ...
15
votes
2answers
16k views

How to speed up select distinct?

I have a simple select distinct on some time series data: SELECT DISTINCT user_id FROM events WHERE project_id = 6 AND time > '2015-01-11 8:00:00' AND time < '2015-02-10 8:00:00'; And it takes ...
3
votes
1answer
4k views

Optimizing Amazon RDS - MySQLTuner Recommendations / Feedback & Suggestions

I'm currently trying to optimize a database I've inherited for speed. The server is an Amazon RDS db.m3.large instance: 2 VCPUs 7.5 GB Memory 500 GB HDD My current strategy is to do the following: ...
3
votes
2answers
4k views

Amazon Redshift - The difference between Query Slots, Concurrency and Queues?

We are building a business intelligence system, and we have a huge PostgreSQL Database (DB) where we make all the info processing, and a Redshift Data Warehouse (DWH) where we store the data and ...
1
vote
1answer
91 views

optimizing query for slow queries

I have this query in my slowqueries table which essentially is taking about 5-8 seconds to complete the query time: SELECT s0_.id AS id0, s0_.updated AS updated1, s0_.created AS created2, ...