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:
01130339
Views:
19
>>What SYS(3054) said about this SELECT?
>
>select top 105 trans.cTrans_pk, ;
>NVL(Employee_Queue_Schedules.tScheduled_Time, {^3000-01-01 00:00:00}) as tScheduled_Time, ;
>Trans_Employees_Queues.cTrans_Employees_Queues_Pk, 0 as iAssigned, ;
>space(16) as cCommission_Owner_UsGrLink_fk, ;
>space(16) as cQueue_names_fk ;
>from trans INNER join Trans_Employees_Queues ;
>on trans.cTrans_pk = Trans_Employees_Queues.cTrans_fk ;
>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 = '5776CF7543564793' ;
>and trans.cDepartment_Code like 'O' ;
>and trans.cResolution_Codes_fk is NULL ;
>and	Trans.iAccount_locked_flag = 0 ;
>and between(trans.yCurrent_Balance_Amount, 0.0100, 499.9900) ;
>and Trans_Employees_Queues.iActive_Flag = 1 ;
>AND Trans.cProduct_Line_Code BETWEEN "600" AND "604" ;
>AND tExpire_date < {^2006-06-20} order by tScheduled_Time, tDate_Received
>
>Using index tag Crescod_fk to rushmore optimize table trans
>Using index tag Cproductcd to rushmore optimize table trans
>Rushmore optimization level for table trans: partial
>Using index tag Ccommis_fk to rushmore optimize table trans_employees_queues
>Using index tag Cqueuen_fk to rushmore optimize table trans_employees_queues
>Rushmore optimization level for table trans_employees_queues: partial
>Rushmore optimization level for table employee_queue_schedules: none
>Joining table trans_employees_queues and table trans using index tag Ctrans_pk
>Joining intermediate result and table employee_queue_schedules (Cartesian product)

Index your Employee_Queue_Schedules by iActive_Flag and see if this speed this SELECT up. I hope you have index by cTrans_Employees_Queues_fk in Employee_Queue_Schedules.
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