I have written a small Glue script that fetches some data between two dates, but I found that it scans the entire table instead of just the data within the specified time range. I also tried creating an index on my SQL database, but it didn’t make any difference.
SELECT *
FROM employee_management.employees
WHERE created_at >= '2025-11-11 23:00:00'
AND created_at < '2025-11-12 23:00:00';
SELECT COUNT(*) FROM employee_management.employees;select index_name from information_schema.statistics where table_schema='employee_management' and table_name='employees';