Information générale
Catégorie:
Gestionnaire d'écran & Écrans
I appreciate and thank all of you for your astute input. I've put all the suggestions together, using Select Distinct, losing the order by until later, losing the trim until later, and seperating the command into 2 different views. These all have succeeded in dropping 20 seconds off of the 60 second time. 40 seconds is still quite slow, but I can live with it. I have some worry, though, that as the database grows this time will grow with it, so if anyone has anything else to add, I'd be happy to experiment!
Thanks!!!
>Some ideas:
>
>1. Leave the TRIM(...)s for the client side; that is, SELECT CLAST,CFIRST and do the trimming in your client program.
>
>2. Instead of ordering on the server side, index the view in your program.
>
>3. When I have slow SELECTs, I try separating them. Here, you might have a view with SELECT DISTINCT NCLIENT_ID FROM CHARGE_VISITS, and then define your SELECT so it (inner) joins this view with CLIENTS.
>
>HTH!
Précédent
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