----------------------
Based on the information provided in the knowledge sources, here's how you can approach your objective with LlamaIndex:
- Database Reader vs Vector Database: LlamaIndex supports queries over structured data, such as a SQL Database. It provides advanced features to both create structured data from unstructured data, as well as analyze this structured data through augmented text-to-SQL capabilities. Therefore, you can directly use a database reader for querying your MySQL database.
- Order of Operations: LlamaIndex allows you to use natural language SQL queries. This means you can combine your filtering criteria and content query into a single SQL-like query. For example, in one of the knowledge sources, a natural language query is translated into a SQL query over a table containing city_stats. This suggests that you can apply your filter (based on the valid_from and valid_to fields) within your SQL query.
- Other Considerations: As for performance impacts, indexing strategies, or specific configurations in LlamaIndex for handling SQL data, the knowledge sources do not provide specific details. However, they do mention that once you have loaded data, indexed it, and stored that index, you're ready to query your data. This suggests that proper indexing of your data is an important step before querying.