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:
01130543
Views:
21
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
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform