what queries for get the details of memory space in database?