query-optimization
Sorting by SUM very slow
I have the following query: SELECT SUM(s.count) as count, a.name, s.author_id as id FROM twitter_author_daily_stats s[详细]
2023-04-06 06:21 分类:问答Optimizing queries with acts_as_taggable_on
Using Rails 3.1 and gem \'acts-as-taggable-on\' version 2.1.1. I have a class: class Meal < ActiveRecord::Base[详细]
2023-04-05 19:48 分类:问答Best way to get most relevant data from table MYSQL
I have an entry table with the columns as shown below: id | ans_1 | ans_2 | ans_3| ans_4| ans_5| date Some sample data in the table as shown below:[详细]
2023-04-05 12:53 分类:问答Brutally slow MySQL Query
I\'m happily taking any advice on this - be it rewriting the query, or setting up the tables differently.[详细]
2023-04-05 11:13 分类:问答MySQL Enhancing Performance without Cache
I am using MySQL version 5.5.14 to run the following query from a table of 5 Million rows: SELECT P.ID, P.Type, P.Name, P.cty[详细]
2023-04-05 06:50 分类:问答MySQL: How to make an Index Scan run faster than a Full Table Scan?
I read from MySQL Performance Blog that depending on the selectivity of a query, a full table scan can be faster than an index scan. Bearing such knowledge in mind, I experimented with a query having[详细]
2023-04-05 06:42 分类:问答Need help with database/query design for gamer's rating calculation
I have a game, where for each round player gets a prize and rating by total prize is calculated. I use such schema:[详细]
2023-04-05 02:42 分类:问答Optimize a complex SQL query
I\'m sure there is a better way to do this. It looks at an applications table and collects all applications of a certain status for each job.[详细]
2023-04-04 18:02 分类:问答SQL Performance, What executes faster in the SELECT and WHERE conditions
UPDATE: Crap! it\'s not an integer it\'s character varying(10) Executing the query like this uses the index[详细]
2023-04-04 15:48 分类:问答SQLite trigger optimization
This is a follow up based on this question about query optimization. In order to make fast selection, as suggested, I tried to pre-compute some data at insertion time using a trigger.[详细]
2023-04-04 01:35 分类:问答