I face a weird situation where the same query is executing fast in the environment even though the index is unavailable and it's slow in another environment where the index is available. Can someone please help me with this? The table structure is identical in both the environments and also the data is around 2 million.
I did a select to find the execution time on both the servers. The query is executed in 2 sec in the environment where there is no index available and it took around 80 sec in the environment where an index is available.
UPDATE jobs_feed
set posted_to_gfj=3
WHERE posted_to_gfj = 1
AND posted_date < '2022-06-28'
ORDER BY posted_date ASC limit 8000;
column:posted_to_gfj tinyint(1)
column:posted_date datetime