| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 1 year |
| seen | May 10 at 7:53 | |
| stats | profile views | 2 |
|
May 6 |
comment |
Index optimizationPRIMARY KEY has only one job and that's what you said earlier - uniqueness. It just exists so you can distinguish between rows. Now, having an autoincremented integer is the easiest method to implement this kind of behaviour. Also, the smart guys that developed InnoDB used the integer-auto_incremented PK to also boost performance. To keep it short, there's nothing wrong with your DB schema, I doubt you can do much there except min/max maybe, but personally I wouldn't change anything. |
|
Apr 30 |
comment |
MySQL not using resources? How did you test for I/O? |
|
Mar 13 |
comment |
Can I move up rows in the memory itself? It is, you think your idea is a good solution so you're looking for means to do that. I can tell you immediately that whenever you want to tamper with how database stores something, you're 100% doing something wrong. There is not a single exception to this rule. Moving rows up and down for some reason is a terrible idea. You should structure the table in such a way that when you query it - you get it in the order you specified. It would be much easier if you explained in detail what the problem really is. |
|
Mar 13 |
comment |
Can I move up rows in the memory itself? This is such an xy problem, you should probably rethink your design. It's also very, very difficult to understand what the goal behind your idea is. |
|
Aug 13 |
comment |
error 1118: row size too large. utf8 innodb Can you post the output of SHOW CREATE TABLE tablename so we can try and replicate the problem at our machines? |
|
Aug 10 |
comment |
error 1118: row size too large. utf8 innodb Is this InnoDB or MyISAM? |
|
May 16 |
comment |
Why doesn't InnoDB store the row count? @SoboLAN - no, it wouldn't. Having a service that updates some sort of statistics table at predefined time intervals is much better. Imagine having a large database and several administrators querying most of the tables with SELECT COUNT(*), add a non-optimized WHERE to the table and you'll have a few users bringing the db to its knees for several questionably-useful stat counters. |
|
May 16 |
awarded | Teacher |
|
May 16 |
awarded | Supporter |
|
Nov 21 |
answered | What are the trade offs for incrementing ids vs. fulltext keys for foreign key designs? |