fix #228 Machine Demo - Redis query optimization