Reputation
315
Top tag
Next privilege 500 Rep.
Access review queues
Badges
1 4 16
Impact
~26k people reached

  • 0 posts edited
  • 1 helpful flag
  • 10 votes cast
Jun
4
awarded  Yearling
Jun
4
comment Why don't databases create their own indexes automatically?
@JNK, the point being like AndréParamés said, if it's affecting more queries negatively then it would remove the index again and disregard it as an option for automatic creation and later on when you decided to try it yourself, the server could warn you it's already tried it on X date. you keep saying that it's part art, but it can be boiled down to repetitive modification over time.
Jun
4
comment Why don't databases create their own indexes automatically?
@JNK my previous comment was in response to yours to AndréParamés, i understand that there would be a large cost in implementing an index, and obviously it would be something that was configurable to your environment.
Jun
4
comment Why don't databases create their own indexes automatically?
@JNK that would not be an index that would be automatically applied. something an RDBMS could implement itself would be smaller repetitive queries, the "low hanging fruit" if you will. something where you're constantly filtering on one item, such as all posts from X user.
Jun
4
comment Why don't databases create their own indexes automatically?
@ypercube do you not have redundancy? load balancing? do your queries have to use that index if it's being created? i don't understand why creating an index should lock a table
Jun
4
comment Why don't databases create their own indexes automatically?
@AndréParamés exactly!
Jun
4
comment Why don't databases create their own indexes automatically?
A database can already put an index on a table it just currently requires us to command it to, a car physically cannot replace a tire, until we build it some arms to use.
Jun
4
comment Why don't databases create their own indexes automatically?
a more accurate analogy is does your ECU alter the power supplied to the fuel pump to fix fuel/oil flow rates and compensate for dirty lines? to which the answer is yes..
Jun
4
comment Why don't databases create their own indexes automatically?
@KennethFisher the idea wasn't to anticipate future workloads, but to improve on recurring ones. for an example, i constantly hit the user table getting a list of all the posts from a user, this happens once every 10 queries and queries happen about 300/sec, couldn't the DB work out that an index on that would be advantageous just from the hit rate?
Jun
4
comment Why don't databases create their own indexes automatically?
why can't they take an iterative approach to it? i understand that on a server that is pushed to the limit already it'd be a bad thing having your DB attempt to tweak itself automatically and so you'd turn it off. but surely if a database is able to suggest queries to you, then it could surely try it out when at lower than average load and determine if there is a performance hit.
Jun
4
asked Why don't databases create their own indexes automatically?
Apr
5
accepted Comparing two tables for a UUID change and fix it
Apr
3
asked Comparing two tables for a UUID change and fix it
Mar
26
awarded  Tumbleweed
Mar
19
asked How do I check if a constraint exists on Firebird?
Feb
5
accepted Automatic MySQL Sync from master, where Slave was offline for long period of time
Feb
5
asked Automatic MySQL Sync from master, where Slave was offline for long period of time
Jan
31
accepted Master to Slave to Slave Configuration in MySQL
Jan
31
comment Master to Slave to Slave Configuration in MySQL
let us continue this discussion in chat
Jan
31
revised Master to Slave to Slave Configuration in MySQL
Added Master Status