Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>I need to get the last 10 records of a table based on a condition. However, that table is pretty big and I don't want to use the TOP 10 clause as it will take too long. What type of approach can I use which would be the best? I am looking for a SQL approach. If that is not possible then I'll consider using code.
If your conditions are few and fixed, you could make a little table for each condition in which you cache the last 10 inserts into the main table that match the condition.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement