database-optimization Questions
1
Solved
I would like to speed up the queries on my big table that contains lots of old data.
I have a table named post that has the date column created_at. The table has over ~31 million rows and ~30 milli...
Flosser asked 3/6, 2022 at 9:43
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...
Fayfayal asked 4/3, 2021 at 21:22
15
Solved
I have statements like this that are timing out:
DELETE FROM [table] WHERE [COL] IN ( '1', '2', '6', '12', '24', '7', '3', '5')
I tried doing one at a time like this:
DELETE FROM [table] WHERE ...
Wigley asked 5/6, 2012 at 16:39
3
Solved
I'm learning how to optimize my database by re choosing the correct data types for the columns and I want to know how much size I will save if I choose MEDIUMINT (3 Bytes) instead of INT(4 Bytes)
...
Flinn asked 26/4, 2018 at 23:10
3
Solved
I have a user table in mysql containing all user data (firstname, surname, address, etc)
But should I store the authentication details in another table (username, password) and link the two tables...
Legere asked 18/12, 2011 at 23:28
2
Solved
I am running a batch operation over all rows in a database. This involves selecting every single model and doing something to it. It makes sense to split this into chunks and do it chunk by chunk.
...
Sister asked 3/1, 2012 at 0:17
3
Solved
I have the following table storing data about images:
images
- id (int)
- sample_1_1 (int)
- sample_1_2 (int)
- sample_1_3 (int)
- sample_2_1 (int)
- sample_2_2 (int)
- sample_2_3 (int)
- ...
Kennykeno asked 3/8, 2012 at 9:30
3
Solved
I have some innoDbs with only 2 int columns which are foreign keys to the primary keys of other tables.
E.g one table is user_items, it has 2 columns, userId, itemId, both foreign keys to user and...
Damnable asked 24/6, 2012 at 9:42
1
Solved
Evening,
I'm going through the long process of importing data from a battered, 15-year-old, read-only data format into MySQL to build some smaller statistical tables from it.
The largest table I ...
Hidie asked 30/5, 2012 at 23:24
4
Solved
Firstly, I should point out I don't have much knowledge on SQL Server indexes.
My situation is that I have an SQL Server 2008 database table that has a varchar(max) column usually filled with a lo...
Shifrah asked 2/5, 2012 at 22:54
1
Solved
I'd like to know, which option is the most expensive in terms of bandwith and overall efficiency.
Let's say I have a class Client in my application and a table client in my database.
Is it better...
Playbill asked 24/3, 2012 at 21:35
5
Solved
I was once told that it is faster to just run an insert and let the insert fail than to check if a database entry exists and then inserting if it is missing.
I was also told that that most databas...
Minesweeper asked 20/1, 2012 at 4:58
1
Solved
So I always thought that seeing "Using Where" in the Extra column was a good thing. However, I was planning a brown bag lunch for my coworkers on intepreting EXPLAIN and now I'm not so sure. The My...
Wanonah asked 9/8, 2011 at 21:50
8
Solved
We have a query to remove some rows from the table based on an id field (primary key). It is a pretty straightforward query:
delete all from OUR_TABLE where ID in (123, 345, ...)
The problem is ...
Gribble asked 23/2, 2009 at 10:44
4
Solved
I have two tables here:
ITEMS
ID| DETAILS| .....| OWNER
USERS:
ID| NAME|....
Where ITEMS.OWNER = USERS.ID
I'm listing the items out with their respective owners names. For this I could use a j...
Disharmony asked 21/1, 2011 at 12:20
5
Solved
I need to fit in additional data into a database, and I have a choice between modifying an existing table (table_existing) or creating new tables.
This is how table_existing looks like right now:
...
Segarra asked 26/11, 2010 at 15:51
2
Solved
In docs for various ORMs they always provide a way to create indexes, etc. They always mention to be sure to create the appropriate indexes for efficiency, as if that is inherent knowledge to a non...
Approbation asked 4/11, 2010 at 3:59
1
© 2022 - 2024 — McMap. All rights reserved.