Does creating index on a column which is there in sort order improves performance? I need to know this for Mysql, Postgresql and Oracle database.
E.g query:
select * from article_comments where article_id = 245 order by date_created desc limit 30;
In article_comments table, article_id is an indexed field, where as date_created is not. If we create an index on date_created, will it improve performance. Table size is around 5-7 million rows.
ALTER INDEX index INVISIBLE / VISIBLE;which enables you to test without creating and dropping the index again and again.