articles.php getList method query decomposed into two and optimized