索引查询问题,急!
小弟有一个数据库,记录共有3102575条记录,经常使用SELECT-SQL查询根据某个条件提取出自己想要的数据,问题是用SELECT-SQL查询速度太慢,我想用索引查询的方式查询,结果弄了半天,只能查询出2条记录,太郁闷了,请高手为我看看程序不知道哪里不对,SET TALK OFF
SET SAFETY off
CLOSE ALL
SELECT 1
USE 2009 ORDER hm
SELECT 2
USE kk
ZAP
SELECT 1
seek "江于友"
IF FOUND()
jyrqzd=ALLTRIM(jyrq)
jgmzd=ALLTRIM(jgm)
dljgzd=ALLTRIM(dljg)
jymzd=ALLTRIM(jym)
zyzd=ALLTRIM(zy)
zhzd=ALLTRIM(zh)
hmzd=ALLTRIM(hm)
bzzd=ALLTRIM(bz)
kmhzd=ALLTRIM(kmh)
dfkmzd=ALLTRIM(dfkm)
jyjezd=jyje
yezd=ye
czyzd=ALLTRIM(czy)
fhyzd=ALLTRIM(fhy)
zxlshzd=ALLTRIM(zxlsh)
SELECT 2
APPEND blank
replace jyrq WITH jyrqzd,jgm WITH jgmzd,dljg WITH dljgzd, jym WITH jymzd,zy WITH zyzd,zh WITH zhzd,hm WITH hmzd,bz WITH bzzd,kmh WITH kmhzd,dfkm WITH dfkmzd,jyje WITH jyjezd,;
ye WITH yezd,czy WITH czyzd,fhy WITH fhyzd,zxlsh WITH zxlshzd
ENDIF
SELECT 1
DO WHILE NOT EOF()
SKIP
IF FOUND()
jyrqzd=ALLTRIM(jyrq)
jgmzd=ALLTRIM(jgm)
dljgzd=ALLTRIM(dljg)
jymzd=ALLTRIM(jym)
zyzd=ALLTRIM(zy)
zhzd=ALLTRIM(zh)
hmzd=ALLTRIM(hm)
bzzd=ALLTRIM(bz)
kmhzd=ALLTRIM(kmh)
dfkmzd=ALLTRIM(dfkm)
jyjezd=jyje
yezd=ye
czyzd=ALLTRIM(czy)
fhyzd=ALLTRIM(fhy)
zxlshzd=ALLTRIM(zxlsh)
SELECT 2
APPEND blank
replace jyrq WITH jyrqzd,jgm WITH jgmzd,dljg WITH dljgzd, jym WITH jymzd,zy WITH zyzd,zh WITH zhzd,hm WITH hmzd,bz WITH bzzd,kmh WITH kmhzd,dfkm WITH dfkmzd,jyje WITH jyjezd,;
ye WITH yezd,czy WITH czyzd,fhy WITH fhyzd,zxlsh WITH zxlshzd
ENDIF
ENDDO
CLOSE ALL
USE kk
COPY TO c:\init\江于友 TYPE xls
=MESSAGEBOX("处理完毕!!")
CLOSE ALL
小弟在此先谢谢了!