This trade really breaks into two parts: players and contracts.
The swap of Flynn for Miller leaves the Rockets without the services of Rick Adelman's favorite center, who conclusively proved last year that he couldn't defend anyone. Coming off of microfracture surgery, it's likely that Miller will have no further use in the NBA. His contract is still meant to be passed around, because that is how the NBA does things, but he is essentially negative value. Flynn has more value than that, but as a buy-low candidate, there certainly isn't much to be realized. Rockets GM Daryl Morey immediately started shopping him again, so I'd recommend Flynn rent rather than buy. Still, he has more value than Miller and is cheaper.
The future first round pick, which is a heavily lottery protected Grizzlies pick, doesn't have much value. Motiejunas is a lottery ticket that doesn't solve much for the Rockets in the near term. When you draw comparisons to Andrea Bargnani, that isn't exactly a pickup worth going gaga over. Perhaps Houston's front office believes he can become a terrific offensive force, but that seems unlikely. Particularly since scouts can't seem to stop talking about his poor makeup.
However, at the relatively low cost that Houston gave up, it's hard to really get mad at this trade. It's a low-risk medium-reward trade.
Grade: A Woot! Bag Of Crap. Motiejunas may not be more than the next David Anderson or Sam Perkins. Given what the Rockets have invested though, it's hard to fault them for taking a chance on it if their scouts like him as much as they seem to.