forms query slow - SQL*plus query fast [message #180171] |
Fri, 30 June 2006 08:22 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
When running a simple query at SQL*Plus prompt based on two indexed columns for a table with 35 millions rows, I get an immediate response. Making the most basic Form, querying on those two columns is very slow.
Here it is in SQL*Plus session.
ABC@foodb> l
1 select count(*) from table1
2 where code='ABC'
3* and fargo='06XXXX050'
Execution Plan
----------------------------------------------------------
0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=1 Card=1 Bytes=14)
1 0 SORT (AGGREGATE)
2 1 TABLE ACCESS (BY GLOBAL INDEX ROWID) OF 'TABLE1' (TABLE) (Cost=1 Card=1 Bytes=14)
3 2 INDEX (RANGE SCAN) OF 'VAR_PX_X' (INDEX) (Cost=1 Card=6)
When I use either column alone (fargo or code) in the form, I get an immediate result. Table and indexes statistics were run just before the queries.
[Updated on: Fri, 30 June 2006 09:14] Report message to a moderator
|
|
|
|