Home » Developer & Programmer » Forms » forms query slow - SQL*plus query fast
forms query slow - SQL*plus query fast [message #180171] Fri, 30 June 2006 08:22 Go to next message
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

Re: forms query slow - SQL*plus query fast [message #180316 is a reply to message #180171] Mon, 03 July 2006 01:48 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
What version of forms and what version of database are you using?

David
Previous Topic: Icons partly displayed
Next Topic: TO_CHAR problem ORA-01855
Goto Forum:
  


Current Time: Fri Sep 20 08:45:39 CDT 2024