Revert "Improved flatten and usage of memory in SELECT by using iterators rather than collections"

This reverts commit f7b0a93cf6788e821445a65cacd3e4560eff38d8.
Revert "Revert "Improved flatten and usage of memory in SELECT by using iterators rather than collections""

This reverts commit fe77b5d5ba92f046f955b7627f9b50f4218a5858.
Revert "Revert "Revert "Improved flatten and usage of memory in SELECT by using iterators rather than collections"""

This reverts commit dfd06ef4ec4fa955fdfe1e122eae39ea670fad89.
Revert "Revert "Revert "Revert "Improved flatten and usage of memory in SELECT by using iterators rather than collections""""

This reverts commit 62dd1b36b94edd66f76b0c4d2d33947607e7f80f.
Revert "Revert "Revert "Revert "Revert "Improved flatten and usage of memory in SELECT by using iterators rather than collections"""""

This reverts commit 20fee58f9e23e0baa98313e1702a5f76e92b443f.
Revert "Revert "Revert "Revert "Revert "Revert "Improved flatten and usage of memory in SELECT by using iterators rather than collections""""""

This reverts commit 4fb5c44d6f72cc7563431a45ffc06c6a8daf1c16.