Has anyone tried this combination?
We upgraded some of our servers from ODS 7.14 to IDS 7.30 this weekend.
We then discovered that one front-end running 4gl 6.04 (and esql/c 7.14)
had big troubles with some queries. When place-holders were used in
prepared statements in the 4gl or esql/c code, no indexes where used,
we got only sequential scans.
For instance:
create table tab1(a char(2), b char(15), c char(4), d char(35));
create unique index i_tab1 on tab1(a,b,c);
.
.
in the esql/c-program (sample code, untestet but get the picture):
$prepare sel from
"select d from tab1 where a = ? and b = ? and c = ?";
$declare c_sel cursor for sel;
$open c_sel using p_a, p_b, p_c;
We got sequential scan, whilst this query used the unique index:
sprintf(s,"select d from tab1 where a = '%s' and b = '%s' and c = '%s'",
p_a,p_b,p_c);
$prepare sel from $s;
$declare c_sel cursor for sel;
$open c_sel;
When the same program was compiled with esql/c 7.30 it used the index.
This was on HP-UX 10.20.
One more strange thing was that one front-end running 4gl 4.12
was OK!
--
'yvind Gjerstad Systems dept Tollpost-Globe AS N-6301 'ndalsnes/Norway
E-mail: ogj@it.tollpost.no Phone: +47 7122 6663 Fax: +47 7122 6694