Re: Slower machine 100's of times faster??
No, not the first SELECT in the 2nd query but the one you modified to use UNION back on the 9th December. Since I now have a performant 2nd query involving the corax_event table using the new Processed column I have moved back to the original query. Here it is in it's current form.
SELECT u.SECURITY_ID, u.CUSIP, NULL, NULL, NULL, NULL, NULL FROM customer_watch_list cw, secm_security_universe u WHERE cw.CUSIP <=> u.CUSIP AND cw.Portfolio_Id = 2
UNION SELECT u.SECURITY_ID, NULL, u.EQU_RIC, NULL, NULL, NULL, NULL FROM customer_watch_list cw, secm_security_universe u WHERE cw.RIC <=> u.EQU_RIC AND cw.Portfolio_Id = 2
UNION SELECT u.SECURITY_ID, NULL, NULL, u.ISIN, EXCHANGE_CD, NULL, NULL FROM customer_watch_list cw, secm_security_universe u WHERE (cw.ISIN <=> u.ISIN AND cw.Exch_Cd = u.EXCHANGE_CD) AND cw.Portfolio_Id = 2
UNION SELECT u.SECURITY_ID, NULL, NULL, NULL, NULL, u.SEDOL, NULL FROM customer_watch_list cw, secm_security_universe u WHERE cw.SEDOL <=> u.SEDOL AND cw.Portfolio_Id = 2
UNION SELECT u.SECURITY_ID, NULL, NULL, NULL, NULL, NULL, u.VALOREN FROM customer_watch_list cw, secm_security_universe u WHERE cw.VALOREN <=> u.VALOREN AND cw.Portfolio_Id = 2
+----+--------------+------------------+------+---------------+------------+---------+--------------------------------------------------+------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+--------------+------------------+------+---------------+------------+---------+--------------------------------------------------+------+--------------------------+
| 1 | PRIMARY | cw | ref | IX_P1 | IX_P1 | 4 | const | 1122 | |
| 1 | PRIMARY | u | ref | IX_CUSIP | IX_CUSIP | 12 | securitymaster.cw.CUSIP | 5 | Using where; Using index |
| 2 | UNION | cw | ref | IX_P1 | IX_P1 | 4 | const | 1122 | |
| 2 | UNION | u | ref | FK_EQU_RIC | FK_EQU_RIC | 23 | securitymaster.cw.RIC | 1 | Using where; Using index |
| 3 | UNION | cw | ref | IX_P1 | IX_P1 | 4 | const | 1122 | |
| 3 | UNION | u | ref | IX_ISIN | IX_ISIN | 19 | securitymaster.cw.ISIN,securitymaster.cw.Exch_Cd | 1 | Using where; Using index |
| 4 | UNION | cw | ref | IX_P1 | IX_P1 | 4 | const | 1122 | |
| 4 | UNION | u | ref | IX_SEDOL | IX_SEDOL | 11 | securitymaster.cw.SEDOL | 1 | Using where; Using index |
| 5 | UNION | cw | ref | IX_P1 | IX_P1 | 4 | const | 1122 | |
| 5 | UNION | u | ref | IX_VALOREN | IX_VALOREN | 9 | securitymaster.cw.VALOREN | 170 | Using where; Using index |
|NULL | UNION RESULT | <union1,2,3,4,5> | ALL | NULL | NULL | NULL | NULL | NULL | |
+----+--------------+------------------+------+---------------+------------+---------+--------------------------------------------------+------+--------------------------+
11 rows in set (0.05 sec)
Even taking the first SELECT out of this set of UNION and running that is very slow.
David
Subject
Views
Written By
Posted
2370
December 09, 2005 11:45AM
1518
December 09, 2005 11:51AM
1606
December 09, 2005 11:53AM
1673
December 09, 2005 12:11PM
1460
December 09, 2005 12:12PM
1451
December 09, 2005 12:33PM
1484
December 10, 2005 10:50AM
1551
December 12, 2005 05:14AM
1481
December 13, 2005 03:16AM
1555
December 13, 2005 05:10AM
1503
December 13, 2005 10:53AM
1632
December 14, 2005 11:17PM
1656
December 16, 2005 05:15AM
1573
December 16, 2005 06:11AM
1823
December 16, 2005 08:14AM
1628
December 16, 2005 11:30AM
1579
December 16, 2005 11:46AM
Re: Slower machine 100's of times faster??
1512
December 16, 2005 12:06PM
1473
December 21, 2005 09:21AM
1647
December 21, 2005 10:08AM
1956
December 23, 2005 09:22AM
1520
December 26, 2005 08:32PM
1500
December 14, 2005 10:47PM
1511
December 23, 2005 12:29PM