Optimize and Order by problems in SCO
am 20.07.2002 19:15:33 von jesilvaDescription:
The point is that it doesn't make the rigth selection of the index
When it performs:
explain select nfactura, nauclfe from auxiliar where nfactura like '30%' or=
der by nfactura;
The result we have is:
table type possible_keys key key_len ref rows Extra
auxiliar ALL PRIMARY NULL NULL NULL 1028572 where used;=20
Using filesort
The name of the table is "auxiliar" and the field "nfactura" is "unique
key" not null.
The rigth answer should be in the column "key" "nfactura" but it isn't=20
as you can see. The value is NULL.
The same query works ok with other versions of MySQL 3.23.45 for FreeBsd.
And another problem is (ORDER BY):
-----------------------
I have table of 1,028,572 rows and i do query all, and after i can't do=20
any
more, because this process to blockade all mysql and i can't do query=20
of any table using ORDER BY. (mysql use filesorting).
What i can do ? May be is SCO version 3.23.43 and 3.23.51?=20
>How-To-Repeat:
CREATE TABLE auxiliar (
nfactura char(10) NOT NULL,
nauclfe char(18) NOT NULL,
ifactura double(16,2) NOT NULL,
iva double(16,2) NOT NULL,
vendpto char(16) NOT NULL,
PRIMARY KEY (nfactura),
INDEX nauclfe_idx (nauclfe),
INDEX vendpto_idx (vendpto));
explain select nfactura, nauclfe, fvcto where nauclfe like '130%' ORDER BY =
nauclfe;
>Fix:
For first problem., I don't know.
For second problem --- Not use ORDER BY.
>Submitter-Id:
>Originator: Superuser
>Organization:
La Industrial Mexicana
Av. Convencion Sur 1400
Colonia Caminera
Aguascalientes, Ags, Mexico.
Telf. 52-449-9105006
>MySQL support: [none | licence | email support | extended email support ]
none
>Synopsis: Not selected index and ORDER BY blockade mysql
>Severity: critical
>Priority: high
>Category: mysql
>Class: support
>Release: mysql-3.23.51 (Source distribution)
>Environment:
System: SCO_SV limsa1 3.2 5.0.6 i386
Some paths: /bin/make /usr/local/bin/gcc /bin/cc
GCC: Reading specs from /usr/local/lib/gcc-lib/i486-pc-sco3.2v5.0/2.95/specs
gcc version 2.95 19990728 (release)
Compilation info: CC=3D'gcc' CFLAGS=3D' ' CXX=3D'gcc' CXXFLAGS=3D'-O3' =
LDFLAGS=3D''
LIBC:=20
lrwxrwxrwx 1 root sys 35 Jul 17 19:01 /lib/libc.a -> /opt/K=
/SCO/unixds/5.1.2A/lib/libc.a
lrwxrwxrwx 1 root sys 36 Jul 17 19:01 /lib/libc.so -> /opt/=
K/SCO/unixds/5.1.2A/lib/libc.so
lrwxrwxrwx 1 root sys 39 Jul 17 19:01 /usr/lib/libc.a -> /o=
pt/K/SCO/unixds/5.1.2A/usr/lib/libc.a
lrwxrwxrwx 1 root sys 40 Jul 17 19:01 /usr/lib/libc.so -> /=
opt/K/SCO/unixds/5.1.2A/usr/lib/libc.so
lrwxrwxrwx 1 root root 41 Jun 26 11:48 /usr/lib/libc.so.1 ->=
/opt/K/SCO/Unix/5.0.6Ga/usr/lib/libc.so.1
Configure command: ./configure --prefix=3D/usr/local/mysql --with-extra-cha=
rsets=3Dcomplex CC=3Dgcc CXXFLAGS=3D-O3 CXX=3Dgcc
------------------------------------------------------------ ---------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail bugs-thread12205@lists.mysql.com
To unsubscribe, e-mail