|
Optimus Prime Ribs posted:Well, that certainly is obfuscated... Yes, it's quite unwieldy.
|
# ? Aug 13, 2012 22:01 |
|
|
# ? Apr 28, 2024 07:42 |
|
code:
quote:゚ω゚ノ= /`m´)ノ ~┻━┻ //*´∇`*/ ['_']; o=(゚ー゚) =_=3; c=(゚Θ゚) =(゚ー゚)-(゚ー゚); (゚Д゚) =(゚Θ゚)= (o^_^o)/ (o^_^o);(゚Д゚)={゚Θ゚: '_' ,゚ω゚ノ : ((゚ω゚ノ==3) +'_') [゚Θ゚] ,゚ー゚ノ ゚ω゚ノ+ '_')[o^_^o -(゚Θ゚)] ,゚Д゚ノ(゚ー゚==3) +'_')[゚ー゚] }; (゚Д゚) [゚Θ゚] =((゚ω゚ノ==3) +'_') [c^_^o];(゚Д゚) ['c'] = ((゚Д゚)+'_') [ (゚ー゚)+(゚ー゚)-(゚Θ゚) ];(゚Д゚) ['o'] = ((゚Д゚)+'_') [゚Θ゚];(゚o゚)=(゚Д゚) ['c']+(゚Д゚) ['o']+(゚ω゚ノ +'_')[゚Θ゚]+ ((゚ω゚ノ==3) +'_') [゚ー゚] + ((゚Д゚) +'_') [(゚ー゚)+(゚ー゚)]+ ((゚ー゚==3) +'_') [゚Θ゚]+((゚ー゚==3) +'_') [(゚ー゚) - (゚Θ゚)]+(゚Д゚) ['c']+((゚Д゚)+'_') [(゚ー゚)+(゚ー゚)]+ (゚Д゚) ['o']+((゚ー゚==3) +'_') [゚Θ゚];(゚Д゚) ['_'] =(o^_^o) [゚o゚] [゚o゚];(゚ε゚)=((゚ー゚==3) +'_') [゚Θ゚]+ (゚Д゚) .゚Д゚ノ+((゚Д゚)+'_') [(゚ー゚) + (゚ー゚)]+((゚ー゚==3) +'_') [o^_^o -゚Θ゚]+((゚ー゚==3) +'_') [゚Θ゚]+ (゚ω゚ノ +'_') [゚Θ゚]; (゚ー゚)+=(゚Θ゚); (゚Д゚)[゚ε゚]='\\'; (゚Д゚).゚Θ゚ノ=(゚Д゚+ ゚ー゚)[o^_^o -(゚Θ゚)];(o゚ー゚o)=(゚ω゚ノ +'_')[c^_^o];(゚Д゚) [゚o゚]='\"';(゚Д゚) ['_'] ( (゚Д゚) ['_'] (゚ε゚+(゚Д゚)[゚o゚]+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚ー゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ (゚ー゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((゚ー゚) + (o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (゚Θ゚))+ ((o^_^o) +(o^_^o))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) +(o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ (゚ー゚)+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚ー゚)+ (c^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (o^_^o)+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((o^_^o) - (゚Θ゚))+ (゚Д゚)[゚ε゚]+(゚Θ゚)+ ((゚ー゚) + (o^_^o))+ ((゚ー゚) + (゚Θ゚))+ (゚Д゚)[゚ε゚]+((゚ー゚) + (゚Θ゚))+ (゚Θ゚)+ (゚Д゚)[゚ε゚]+((゚ー゚) + (o^_^o))+ (o^_^o)+ (゚Д゚)[゚o゚]) (゚Θ゚)) ('_');
|
# ? Aug 13, 2012 22:18 |
|
Oh, right, it was the emoticon one that I overloaded by feeding it its own output too many times. Boy does that look a mess.
|
# ? Aug 13, 2012 22:34 |
|
I think I just came across a small coding horror; for the past while our service hasn't been logging sales from some of our clients, meaning that our data is out of date, which is bad. I managed to track down the most likely cause of the problem to a subtle typo. Observe. JavaScript code:
|
# ? Aug 16, 2012 21:47 |
|
Surely that'd throw an exception? Or is there some other function called setCustomerId?
|
# ? Aug 16, 2012 22:05 |
|
Anyone have any idea why this works? http://jsfiddle.net/btleffler/jRteU/ JavaScript code:
|
# ? Aug 16, 2012 22:23 |
|
setInterval takes either a function or a string that gets eval'd. https://developer.mozilla.org/en-US/docs/DOM/window.setInterval
|
# ? Aug 16, 2012 22:29 |
|
pokeyman posted:setInterval takes either a function or a string that gets eval'd. Does the string get eval()'d in the scope of the caller or something? Otherwise I don't see how it could close over foo.
|
# ? Aug 16, 2012 22:37 |
|
It doesn't close over foo. He assigns it to the window, which is the global object.
|
# ? Aug 16, 2012 22:39 |
|
pokeyman posted:Surely that'd throw an exception? Or is there some other function called setCustomerId? That's the problem exactly. The reportSales function tries to call setCustomerID, it throws an exception because there is no setCustomerID function, and errors out of the reportSales function.
|
# ? Aug 16, 2012 22:43 |
|
I hope the fix that you deployed was to make aliases.
|
# ? Aug 17, 2012 01:13 |
|
Suspicious Dish posted:I hope the fix that you deployed was to make aliases. Haven't deployed it yet; will hold off until tonight, after peak business hours for the clients, when my frenzied attempts to fix the real problem won't cause too many problems for people. Adding this alias will still cause a small problem because the JS file it's going in is already 43K and growing, which is one of the reasons I want to refactor it. darthbob88 fucked around with this message at 02:55 on Aug 17, 2012 |
# ? Aug 17, 2012 02:49 |
|
hey why is the month wrong on this page?JavaScript code:
|
# ? Aug 17, 2012 15:35 |
|
Alligator posted:hey why is the month wrong on this page? Speaking of crappy arrays, I found a great pair in some PHP code this week. Someone had an array of "Second, "Minute", "Hour", etc, up to "Year", and then a second unrelated array with 1, 60, 3600...I just don't know why hashes seem to elude so many PHP programmers (and that's ignoring the non-use of strtotime)
|
# ? Aug 17, 2012 17:25 |
|
http://blog.serverdensity.com/removing-memcached-because-its-too-slow/quote:Throttling: the performance impact of the global lock in MongoDB 1.8 was such that we couldn’t insert our monitoring postback data directly into MongoDB – it had to be inserted into Memcached first then throttled into MongoDB via a few processor daemons (as opposed to larger numbers of web clients). Using memcache (a cache of all things) as a write queue for mongo db.
|
# ? Aug 20, 2012 01:21 |
|
This must be what the nosql revolution looks like
|
# ? Aug 20, 2012 02:29 |
|
to help speed it up even more they should use a bloom filter to test if the data they're writing is already in their database!
|
# ? Aug 20, 2012 03:07 |
|
Factor Mystic posted:This must be what the nosql revolution looks like Just the highly visible, stupider side. All the good nosql work is done in huge places like Amazon and Google and their poo poo actually works.
|
# ? Aug 20, 2012 03:23 |
|
trex eaterofcadrs posted:Just the highly visible, stupider side. All the good nosql work is done in huge places like Amazon and Google and their poo poo actually works. Possibly Yahoo, as well. They have a big NoSQL system they've developed internally.
|
# ? Aug 20, 2012 03:27 |
|
Aleksei Vasiliev posted:to help speed it up even more they should use a bloom filter to test if the data they're writing is already in their database! Riak 1.2's leveldb backend adds a bloom filter because otherwise checking for non-existence of a key was expensive as poo poo. The application I work on that previously used a secondary index to see if we needed to write a new or update an existing value will now use a bloom filter to test if the data we're writing is already in the database.
|
# ? Aug 20, 2012 05:23 |
|
tef posted:http://blog.serverdensity.com/removing-memcached-because-its-too-slow/ I bet that completely undoes all the work making MongoDB green:
|
# ? Aug 20, 2012 05:26 |
|
*writes sql query* *watches db engine turn query into a series of data streams, cached partial operations, spools, bloom filters, etc....* *laughs at nosql people doing it by hand*
|
# ? Aug 20, 2012 08:32 |
|
Cocoa Crispies posted:I bet that completely undoes all the work making MongoDB green: https://twitter.com/bgajdero/status/231487316877778945 This is amazing (scroll up to read the whole thing in context)
|
# ? Aug 20, 2012 08:56 |
|
Zombywuf posted:*writes sql query* If we're honest, it's more like: Writes Sql Query, Watches it turn into series of streams, cached operations etc, Rewrites Sql Query after inspecting the query plan, tries again. Laughs at nosql people writing what they want directly rather than second guessing a non deterministic query planner.
|
# ? Aug 20, 2012 13:09 |
|
Nearly nobody explores the PA/EC parts of PACELC
|
# ? Aug 20, 2012 13:43 |
|
tef posted:If we're honest, it's more like: Postgres's query planner is only non-deterministic in certain deterministic cases. Otherwise it's pretty easy to predict.
|
# ? Aug 20, 2012 13:44 |
|
tef posted:If we're honest, it's more like: You missed off: Update statistics Wait Pray Re-run Swear Add missing index that the query plan is complaining about, even though you know it won't use it Re-run Moan softly as it still does a full table scan I like working with traditional RDBMS, but let's be honest, it's more a craft than a science.
|
# ? Aug 20, 2012 16:22 |
|
Postgres 9.2 introduces index only scans http://wiki.postgresql.org/wiki/What%27s_new_in_PostgreSQL_9.2#Index-only_scans
|
# ? Aug 20, 2012 16:49 |
|
Milotic posted:You missed off: Well, if you will trust the magic index hinter (hint: don't).
|
# ? Aug 20, 2012 17:04 |
|
Zombywuf posted:Well, if you will trust the magic index hinter (hint: don't). I don't. That said, it has helped when someone creates a table with a foreign key and forgets to create an index on the foreign key. The % of batch information in the query plan is also utterly misleading. No Gods, no masters, only SET STATISTICS TIME ON.
|
# ? Aug 20, 2012 17:09 |
|
Milotic posted:I don't. That said, it has helped when someone creates a table with a foreign key and forgets to create an index on the foreign key. The % of batch information in the query plan is also utterly misleading. No Gods, no masters, only SET STATISTICS TIME ON. Heh, postgres doesn't let you do that. Also, run the query with plan output mode on (or SET STATISTICS XML ON) to get the real % batch information. Also STATISTICS IO ON. In fact, turn everything on. When I used to do stuff in SSMS my template empty buffer looked something like: code:
|
# ? Aug 20, 2012 19:54 |
|
Zombywuf posted:Heh, postgres doesn't let you do that. Also, run the query with plan output mode on (or SET STATISTICS XML ON) to get the real % batch information. Also STATISTICS IO ON. In fact, turn everything on. When I used to do stuff in SSMS my template empty buffer looked something like:
|
# ? Aug 20, 2012 20:21 |
|
I'm not surprised that people who's only RDBMS experience is with MySQL think that SQL is overrated. Most of the MySQL databases I come across have no indexes whatsoever. I explained what a View was and why you'd want one to a PHP "developer" recently and it was a literal
|
# ? Aug 20, 2012 21:41 |
|
Ender.uNF posted:I'm not surprised that people who's only RDBMS experience is with MySQL think that SQL is overrated. Most of the MySQL databases I come across have no indexes whatsoever. I explained what a View was and why you'd want one to a PHP "developer" recently and it was a literal We I stuck an EXPLAIN EXTENDED to the front, found the table scans, and added the relevant indexes. It just boggles the mind how many times I've seen people not understand what an index does. As for views... I've had trouble finding good uses for them. I know there are some good ones, but it seems like they're mostly an easy way to effectively turn a SELECT statement into a new (always up-to-date) table. Maybe useful to cut out the hand-written JOINs, though.** * I've been doing what I can, but hundreds of rows of the same varchar() value don't really index well. ** In my spare time at my job I like to read through the MySQL documentation (and sometimes that of other languages like Lua). I'm trying to learn, but my job does't really offer any opportunities to put it to use.
|
# ? Aug 20, 2012 23:41 |
|
Ender.uNF posted:I'm not surprised that people who's only RDBMS experience is with MySQL think that SQL is overrated. Most of the MySQL databases I come across have no indexes whatsoever. I explained what a View was and why you'd want one to a PHP "developer" recently and it was a literal Speaking as probably-one-of-those-developers, would you recommend a specific book for learning that kind of thing? Even the college I went to treated SQL as "data blobs" and 90% of the teacher-given examples were of the "select * from blah" type.
|
# ? Aug 21, 2012 00:04 |
|
Ursine Asylum posted:Speaking as probably-one-of-those-developers, would you recommend a specific book for learning that kind of thing? Even the college I went to treated SQL as "data blobs" and 90% of the teacher-given examples were of the "select * from blah" type. This website is specifically about indexes. I flicked through some of it one time and it seemed ok. Looks like they are selling an actual book as well if you want to kill trees.
|
# ? Aug 21, 2012 00:11 |
|
That website's not terrible at first glance but I haven't read it in depth. The Wikipedia article isn't half bad either: http://en.wikipedia.org/wiki/Database_index At its most basic level, anytime you have a medium-to-large table and you regularly run a query against a column (it appears in the WHERE clause), that column should be indexed. What I tell beginners is that an index is kinda like a hash table or dictionary, only instead of looking up objects you can look up database rows very quickly. Obviously that's not strictly true and there is a lot more to it than that but it gets the point across. The best scenario is where you take your top X queries and create an index for each one with the columns that appear in the WHERE clause (and for Oracle/MySQL often in the same order). When you do that, the query can return all the matching rows in a trivial amount of time even if there are millions of rows, whereas a table scan could take minutes or more. Another good rule of thumb is to index foreign keys which will usually help your joins speed up by quite a bit, and if your database is any good at query optimization it should be able to stitch together indexes across various joins, groups, etc. For example if one of the tables in the join has 100 million rows, the best plan is probably to use whatever indexes that table has to filter it down to the 100 rows you care about before bothering to join against any of the other tables. SQLServer and Oracle will also split the query up and execute parts in parallel if possible, can't recall if MySQL is doing that as of yet.
|
# ? Aug 21, 2012 00:50 |
|
code:
|
# ? Aug 21, 2012 14:35 |
|
The morons whom my boss picked to host our servers have kept up their reputation of being incompetently unreliable; just came into work to find this on every site:quote:Warning: session_start(): open(/nas/sa7/phpsess/sess_k2khv9jbm0ufi88hatp73lggi7, O_RDWR) failed: Input/output error (5)
|
# ? Aug 21, 2012 14:59 |
|
|
# ? Apr 28, 2024 07:42 |
|
gold brick: Maybe that's just a "clever" way of telling people who use deprecated methods to go gently caress themselves.
|
# ? Aug 21, 2012 16:09 |