Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: performance/query tuning

Re: performance/query tuning

From: Nigel Rudgyard <nigel_at_rudgyard.demon.co.uk.nospam>
Date: 1998/01/21
Message-ID: <885412136.28540.0.nnrp-05.c1ed0cd9@news.demon.co.uk>#1/1

In my experience, it does what you'd expect. It coerces the data type declared within you're program to that defined within the database.

If you populate your table with a large number of records, or alternatively enabling tracing, then you'll find out for sure.

If you're really worried you could always use the 'to_number' function !

Dietmar Leibecke wrote in message <34C5D377.3C267059_at_debis.com.--->...
>Hi,
>
>I'm selecting data from a table via the primary key (field: ID NUMBER(38)).
 In
>my Pro*C program I have a varchar host variable that keeps the id's value.
 What
>does Oracle do, when accessing the table the following way:
>
>#define ID_SIZE 38
>...
>varchar vc_id[ ID_SIZE + 1 ]
>...
>
>ORA_SETVC( vc_id, "5100" ); /* own macro that sets arr and len */
>
>EXEC SQL
> SELECT FIELD1, FIELD2 INTO :vc_field1, :vc_field2 FROM SOMETABLE WHERE
>ID=:vc_id;
>
>Does Oracle convert the host var field into number type (what I hope is the
 way
>it works) or convert the SOMETABLE.ID field into varchar and perform a full
>table scan by disabling an index this way (very bad) ???
>
>Thanks for any input,
>
>--
>Dietmar Leibecke
>----------------
>Address is altered to discourage junk mail.
>Remove ".---" for the real address.
>
>
Received on Wed Jan 21 1998 - 00:00:00 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US