« first day (2058 days earlier)      last day (600 days later) » 

1:46 AM
@TehShrike, can I ask I heard about memcache but I don't know how to use it and when to use it ? can you please help me to enlighten my mind about memcache
 
anyone here?
 
 
11 hours later…
12:49 PM
@jemz People use memcache to cache the results of very frequent or possibly slow queries, so that instead of making the database look up all the rows and do all the joins/grouping, you can just look in memcache (or redis or whatever) and say "do we have a result for the customer billing query for customer 949 already? Cool, just use those results"
@barlop because your SQL client doesn't seem to have it in its list. You can use the CONCAT function there.
 
 
1 hour later…
1:57 PM
If I have an index on a column and I want to update the column's value for a single row, what is the complexity of that operation if I'm using innodb with a b-tree index? Is it log(N)?
 
@user784637 that depends on InnoDB internals and the existing table state, I'm not sure you can easily know that. If you learned a bunch about InnoDB internals, you could probably figure out what the worst-case complexity would be for an update.
 
@TehShrike thank you, would you happen to know a rough estimate?
 
@user784637 it sounds like you're asking the wrong question
what do you want to know?
how the overhead of updating data scales with number of rows?
 
yes - that, the overhead of updating a field that is indexed
@TehShrike So my question is, what is the time complexity of an update operation on a field that is indexed (the index is btree)?
 
2:12 PM
@user784637 the time complexity of the lookup, updating the index, or updating the physical row?
 
@TehShrike just the complexity of updating the index
 
:-|
 
it's a common operation in MySQL. You can think of the complexity as "low"
 
oh okay - I thought updating a field that is indexed is a more costly operation than updating a field that is not indexed
i was just trying to gauge that
 
2:14 PM
The B-tree may need shuffled around a bit
It doesn't have the expense of updating an InnoDB primary key, which causes the whole physical row to have to be moved
 
gotcha ty
 

« first day (2058 days earlier)      last day (600 days later) »