Will this expressions use indices |
John |
2006-04-04 23:38:55 |
First example:
select bcode from mbook where STR(BCODE,6)+movtype>' 1Y'
Second example:
select bcode from mbook where STR(BCODE,6)+movtype=STR(BCODE,6)+'Y'
Please, help me?
|
Re:Will this expressions use indices |
HXTT Support |
2006-04-04 23:47:15 |
If your index expression is STR(BCODE,6)+movtype, you can use
select bcode from mbook where STR(BCODE,6)+movtype>' 1Y'
STR(BCODE,6)+movtype=STR(BCODE,6)+'Y' won't utilized index.
|
Re:Re:Will this expressions use indices |
john |
2006-04-05 00:40:15 |
Thanks!
If I have next index 'STR(BCODE,6)+DTOS(opdate)'. What expression I must write for select records where field opdate<2005-12-01 and bcode is a number.
|
Re:Re:Will this expressions use indices |
john |
2006-04-05 00:48:03 |
Thanks!
If I have next index 'STR(BCODE,6)+DTOS(opdate)'. What expression I must write for select records where field opdate<2005-12-01 and bcode is a number.
|
Re:Re:Re:Will this expressions use indices |
HXTT Support |
2006-04-05 00:54:44 |
You can use STR(BCODE,6)+DTOS(opdate)>=' 120051201'.
BTW where STR(BCODE,6)=' 1' can utilize STR(BCODE,6)+DTOS(opdate) too.
|
Re:Re:Re:Re:Re:Will this expressions use indices |
John |
2006-04-05 01:01:37 |
Thanks a lot!
|
Will this expressions use indices |
John |
2006-04-05 01:26:20 |
|
Why when I use order by or max(exp). It's very slow.
|
Re:Re:Re:Re:Re:Re:Re:Will this expressions use indices |
HXTT Support |
2006-04-05 01:40:07 |
HXTT DBF supports to utilize index for ORDER by clause, when there's no where clause.
For max(exp), HXTT DBF need to do aggregate calculation and filter all deleted rows.
What's your sql?
|
Re:Re:Re:Re:Re:Re:Re:Re:Will this expressions use indices |
John |
2006-04-05 01:53:52 |
select bcode, max(opcode), min(opdate) from mbook
where STR(BCODE,6)+movtype>' 1Y' and
STR(BCODE,6)+DTOS(opdate)>=' 120051201'
group by bcode
|
Re:Re:Re:Re:Re:Re:Re:Re:Will this expressions use indices |
HXTT Support |
2006-04-05 02:11:37 |
You can try:
select bcode, max(opcode), min(opdate) from mbook
where BCODE>=1 and movtype>'Y' and opdate>={d '20051201'} group by bcode
since that where clause need less cacluation.
|
Will this expressions use indices |
john |
2006-04-09 23:42:42 |
Why when I try search fcode=12 and opdate between date1 and date2
using index "STR(FCODE,5)+DTOS(OPDATE)" I've recive fcode = 15, 16 .. etc.
But I need only fcode=12
|
Re:Re:Re:Re:Re:Re:Re:Re:Will this expressions use indices |
HXTT Support |
2006-04-10 02:00:41 |
|
What's your sql?
|