![]() | |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
Hi all, this is my first foray into optimization and I'm at a relatively beginner level. The situation that I have is an exceedingly simple one. I have a table with a list of phone numbers, table A. I have another table with a list of ranges of phone numbers, table B. If the number in A lies between the start_range and end_range in B, then the number is marked. For example, in A a number could be 2125551212. A range in B could be 2125550000, 2125552000. So this number would get marked. So the query is update A set A.marked = 'Y' where exists (select 1 from RANGES B where a.phone>= b.START_RANGE and a.DEST_NO_011<= |
|
b.END_RANGE); Table A has about 9 million rows and B has about 3000. This query runs for hours and hours. I created index on A for phone |
|
indexes on B for start_range and end_range but it's still taking pretty long. |
|
Any other pointers? |
![]() |
| Thread Tools | |
| Display Modes | |
| |