5/10/2005, 9:52 am
This is cut and paste from an email I’m sending to the general mailing list. I’m putting this here so people can add comments. If any of this is wrong or you can think of a situation I didn’t. Add a nice comment
Here, off the top of my head are situations in mysql where you can trust that the data is ordered in some fasion.
1. Using an order by clause on a query.
2. Using a group by the data will come out in ascending order of the column that was grouped on.
3. alter table order by has been performed and the table hasn’t been modified .
4. select key from t; that uses the ‘Using Index’ in explain will return in the order of the key.
Use order by anyway just to be safe.
5/10/2005, 12:26 am
Driving past the crazy chain people coming down off the mountain I saw some very unique scenery. It was odd to think that all of this great country was going to be so close to home again. About this time I began to get fidgety for the ride to end. The scenery surprises were just beginning. It was a cloudy day and getting late. One of those days that produces what I like to call the ‘twilight zone effect”. It’s when a dark cloudy sky and sunset seems to produce a bright yellow glow over everything. This was the most defining when driving from Sacramento to Stockton. Just south of Stockton (I think it was south. It could have been north. Look it up if you really want) there are hills with only a few trees on them. When I say a few I mean about 5, if that. The rest are covered with from a distance looks like meadow grass. These mountains aren’t just decoration. They prop up power generating wind mills. I had heard of wind farms before but had no idea I was about to drive through one. With the twilight zone glow, the bald mountains and the wind farm it was quite a sight. I had a hard time staying on the road.
Past the sights and into the valley I began to feel my way through the many interchanges and possible routes into San Jose and beyond, eventually making my way into Sunnyvale. Time, about 6:00. I pulled off the highway and into a gas station parking lot. Now what? I was technically homeless. I drove down the street until I found a hotel that had open wireless. On to craigslist, from the parking lot of a Best Western I set out to find a new home. Craigslist produced a few hits and I began calling. The first hit I got was an asian family that had turned a back yard garage into an apartment. Yes they actually expected someone to live in their backyard. It was cheap so I checked it out. It was a nice place but very not very private or cozy living under the watching eye of a landlord and having to unlock the gate to their back yard to get in at night. Pass. After three or four more calls I was ready for a meal and bed.
The next day was much the same. Nothing after nothing in Sunnyvale. As I was driving up the road looking a place for lunch I saw a kid waving a free rent sign in front of an apartment complex. “Why not?” I said to myself. It turned out to be a good deal. Waved deposit. They could have given me the keys that night but there was one problem. The first months rent had to be paid with a money order or cashiers check. My bank was in chicago I’m in California. Shit. I learned a few things about money on that weekend. ATM’s have a limit of what they will dispense on any given day. This amount depends on the bank. An ACH takes at least two business days to complete. If you sell an index stock it takes 5 days to settle. If you want me to go into the details of this I will, but trust me I learned the hard way. Money settles and I move in. When I say I moved in I mean I moved in, my stuff was still stuck in a truck.