Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Lesser records to retrieve - longer time?
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01130252
Message ID:
01130555
Views:
24
>Does this make any speed difference:
>
>ldDate    = DATETIME(3000,1,1,0,0,0)
>ldExpDate = DATETIME(2006,6,21)
>
>select top 200 trans.cTrans_pk, ;
>       space(16) as cCommission_Owner_UsGrLink_fk, ;
>       space(16) as cQueue_names_fk, ;
>       0 as iAssigned, ;
>       step1.tScheduled_Time, ;
>       step1.cTrans_Employees_Queues_Pk, ;
>       step1.tExpire_date ;
>from trans;
>;
>INNER join ;
>(select NVL(Employee_Queue_Schedules.tScheduled_Time, m.ldDate) as tScheduled_Time,;
>       Trans_Employees_Queues.tExpire_date,;
>       Trans_Employees_Queues.cTrans_Employees_Queues_Pk,  ;
>       Trans_Employees_Queues.cTrans_fk from Trans_Employees_Queues ;
>;
>LEFT JOIN Employee_Queue_Schedules ON ;
>          Trans_Employees_Queues.cTrans_Employees_Queues_pk = ;
>          Employee_Queue_Schedules.cTrans_Employees_Queues_fk ;
>          and Employee_Queue_Schedules.iActive_Flag = 1 ;
>;
>where Trans_Employees_Queues.cCommission_Owner_UsGrLink_fk IS NULL ;
>  and Trans_Employees_Queues.cQueue_names_fk = 'E06FDF1EC96545BF' ;
>  and Trans_Employees_Queues.iActive_Flag    = 1
>  AND tExpire_date < m.ldExpDate) step1 ;
>on Trans.cTrans_pk = step1.cTrans_fk ;
>;
>where Trans.cDepartment_Code     ='O';
>  and Trans.cResolution_Codes_fk is NULL;
>  and Trans.iAccount_locked_flag = 0;
>  AND Trans.cProduct_Line_Code NOT BETWEEN "600" AND "604";
>;
>order by tScheduled_Time, tDate_Received
>
I see that you moved the Expire date into the inner select. I may try that, but don't think it will make any difference. I may eliminate this whole criterion as it's very unlikely to make an effect (in 99,9999% of the cases the tExpire_date is empty).
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform