如此增加sql執行速度(in子句) |
尚未結案
|
kissdelphi
一般會員 ![]() ![]() 發表:7 回覆:9 積分:3 註冊:2003-01-09 發送簡訊給我 |
sql Text:
select * from cardMaster
where card_no
in ('104717','104789','104822','104823','104824','104825','104826','104827','104914A','104927AR','104937R','104943','104944','104945','104946','104947','104948','104961R','105145','105151','105156','105161','105162','105163','105171A','105172A','105211','105257','105269A','105334AR','105376A','105403A','105534','105551R','105557A','105567','105568','105569','105575','105654A','105654A1','105686A','105697A','105700A','105717R','105718R','105723A','105723B','105736R','105765','105774','105801A','105807','105811','105812','105813','105814','105820','105821','105896A','105900R','105900R2','105921B','105949R','105956','105976R1','106020','106030','106032','106033','106042R','106045A','106052A','106072','106073','106080','106081','106082','106083','106144','106147','106148R1','106171','106204R','106270','106285','106288','106344A1','106350R1','106354A','106368','106369','106376R11','106401','106402','106403','106404','106423R','106433','106434','106436','106439','106484A','106485R1','106486A','106486R','106495A','106495R','106518','106532','106565','106566','106567','106568','106569','106570','106571','106572','106573','106574','106575','106578','106579','106580','106602','106616','106617','106618','106620','106621','106717A','106718A','106718A1','106718R','106719','106743','106784','106787','106788','106789','106791','106792','106851','106852','106873','106880A','106882A','106894','106930','106936','106937','106974A','106975','106987A','107060','107061','107062','107066B','107073','107074','107091','107092','107120','107133','107135','107136','107162','107172','107173','107173R2','107174','107175','107176','107203','107204','107205','107225','107226','107227','107235','107236','107237','107238','107239','107240','107259R','107267','107268','107269','107270','107298A','107303','107304','107305','107339','107342','107343','107345','107347','107394','107395','107397','107400','107404','107406','107437A','107444','107445','107446','107448','107456A','107457A','107480','107481','107482','107483','107484','107485','107492R','107553A','107573A1','107583A','107615','107616','107618','107621','107626','107628','107631R2','107637','107646','107664','107665','107666','107667','107680','107689R','107695','107697','107698','107701','107702','107707B','107796','107797','107798','107799','107800','107810','107811','107812','107813','107814','107815','107816','107843','107846','107849','107851','107879','107880','107881','107888','107891','107893','107914A','107920A','107941','107943','107944','107945','108009R3','108022','108023','108024','108030','108031A','108032A','108052','108053','108068','108070','108071','108072','108082B','108103A1','108107A1','108111R','108115','108116','108117','108118','108129','108130','108131','108132','108133','108168A','108168B','108173A','108173R1','108183','108184','108185','108192R1','117112R','117129','117130','117131','117132','117149','117207','117214','117216','117221B','117222B','117227A','117263R','117265','117266','117267','117298','117322','117323','117324','117343','117344','117345R','117370','117374','117390','117391','117392','117405','117406','117407','117408','117503','117505','117506','117507','117615','117651','117698A','117704','117706','117708','117709','117710','117711','117712','117713','117714','117716','117717','117718','117719','117722','117723','117724','117731B','117749','117764','117778','117796A','117819A','117832R','117833R','117907','117910','117919','117922','117924','117926','118022','118058R','118066','118075','118087','118088','118090','118116','118117','118118','118119','118163','118173','118174','118175','118176','118177','118178','118179','118188','118206','118207','118208','118220','118221','118227','118231','118237','118238','118239','118246','118247','118248','118249','118250','118251','9A69953','A106529R','A58604AR','A58604R','A58610R1','A58634R3','A58648R','A58652R','A58686','A58785R1','A58785RA1','A58787AR','A58787R','A58787R1','A58804AR','A58804R','A58807','A58808R','A58812AR','A58812B1','A58816AR','A58816R','A58819R','A58821A','A58888A','A58888RA3','A58911','A58922A','A58958','A58980A','A58981R','A59044','A59045','A59083','A59084','A59087','A59147','A59148','A59157A1','A59206','A59206A','A59209A','A59217R','A59252A','A59273R','A59284','A59287','A59311','A59326R','A59363R','A59365R','A59374A','A59401','A59415','A59422','A59494','A59502R1','A59561R','A59564A','A59634R','A59653R','A59658R2','A59666','A59680R','A59681R','A59683R','A59722R','A59729','A59759','A59765R1','A59774','A59866','A59883A2','A59900R','A59903','A59937','A59954R1','A599656','A59969','A59975','A60001R','A60013A','A60019','A60027','A60088A','A60099','A60101','A60123R','A60269','A60349R','A60467','A60481A','A60482','A60491','A60492','A60577','A60623','A60654A','A60654B1','A60692A','A60702','A60763','A60764','A60788','A60797','A60802A','A60905','A60908','A60918','A60972','A61037A','A61039','A61041','A61050','A61057','A61191','A61194','A61195','A61211R','A61237','A61238','A61241','A61242','A61243','A61249','A61252','A61260','A61261','A61262','A61263','A61264','A61274','A61275','A61276','A61277','A61278','A61280','A61303','A61304','A61305','A61306','A61307','A61308','A61309','A61310','A61314','A61315','A61316','A61317','A61318','A61383R','A61398R','A61440','A61454AR','A61466R','A61480R1','A61512','A61524A','A61537R','A61538R','A61552','A61553','A61636','A61665','A61673A','A61773','A61801A','A61812','A61830R1','A61868','A61874A','A61893','A61894','A61908','A61985','A62008R','A62014','A62033','A62038A','A62056AB','A66206','A66274','A66275','A66285','A66289','A66290R','A66293','A66315','A66326A','A66371','A66397','A66426R','A66430A','A66438','A66474','A66484','A66512','A66513','A66538A','A66575','A66579','A66632','A66649','A66686','A66697','A66704R1','A66720','A66736','A66737','A66757R','A66800R1','A66833','A66882R','A66903R','A66913R','A66932','A66934','A66935','A66987','A67041','A67113A3','A67127','A67147','A67171','A67174','A67185','A67186','A67193R','A67221','A67236','A67237','A67277','A67285','A67289','A67315','A67336','A67350','A67375','A67389','A67393A','A67394A','A67449','A67610R','A67645A','A67656RA','A67663','A67665','A67666R','A67674','A67676','A67677','A67695','A67713A','A67718','A67756','A67771','A67790','A67824','A67825','A67830','A67831','A67836','A67837','A67856','A67889','A67899AR4','A67909R1','A67932R','A67933','A68009','A68012','A68013','A68014','A68015','A68052R','A68064','A68068','A68079','A68080','A68097R','A68105','A68112R2','A68126A','A68143','A68144','A68150','A68157','A68158','A68204','A68205','A68208','A68246','A68249','A68254','A68270A','A68331','A68348','A68349','A68368A','A68382','A68418B','A68420','A68478','A68498','A68521A','A68552A','A68559AR','A68569A','A68606','A68615','A68616','A68629A','A68671','A68687','A68688','A68689','A68691','A68692','A68697','A68739','A68741','A68742','A68778','A68779','A68809','A68820','A68850R','A68870','A68882','A68886R','A68887R','A68888R','A68890R','A68900','A68917','A68932','A68934','A68935','A68936R','A68941R2','A68970','A68990A','A68995A','A68996A','A68997A','A69015','A69031R','A69057R3','A69064A','A69095','A69107','A69108','A69113','A69115','A69134A3','A69150','A69177R','A69194','A69201','A69203','A69208','A69213','A69228','A69233','A69246A','A69249','A69271','A69272','A69273','A69274','A69275','A69284R','A69299','A69329','A69333B','A69349R','A69349R2','A69368','A69392','A69396','A69416R2','A69425R2','A69430','A69458','A69460','A69479A','A69537','A69555','A69562','A69592','A69593','A69616','A69618','A69661','A69667','A69692R','A69799R','A69844','A69855R2','A69871A','A69909','A69955','A69956','A69962','A69987','A69988','A70026','A70117R','A70128A','A70159','A70161','A70188','A70202','A70205','A70205A','A70212','A70240','A70254R','A70265A','A70273','A70279A','A70342','A70344','A70345','A70347','A70351','A70352','A70354A','A70389','A70440','A70441','A70442','A70444','A70526','A70531','A70619','A70621','A70622','A70699R','A70765','A70766','A70767','A707767','A70777','A70779','A70780','A70789','A70822R','A70860','A70864','A70875','A70881','A70882','A70921','A70941','A70953','A71060','A71074','A71075','A71076','A71077','A71133','A71134','A71135','A71144','A71145','A71146','A71147','A71148','A71166','A71190','A71191','A71194','A71221','A71223','A71224','A71226','A71259','A71264','A71275','A71276','A71277','A71278','A71305','A71316','A71359','A71360','A71361','A71422','A71423','A71434','A71447A','A71460R','A71512R','A71617','A71630R','A71662','A71671','A71722R','A71739','A71756','A71761','A71763','A71909','A71949','A71992','A71993','A72035R4','A72054','A72067','A72075R','A72085','A72091','A72092','A72093','A72094','A72095','A72096','A72097','A72098','A72107','A72120','A72122','A72133','A72140','A72145','A72156A','A72181A1','A72216','A72254R','A72274','A72282','A72284A','A72294','A72309','A72310','A72417','A72425','A72455','A72516R','A72525','A72614','A72644A','A72681','A72705R','A72707A','A72708','A72723','A72740','A72776','A72796','A72820','A72834','A72942AR1','A72971R2','A72972R','A72976RA2','A72999','A73000','A73018','A73019R','A73034','A73088A','A73111','A73115','A73116','A73166R','A73180R','A73194','A73196','A73231','A73237','A73255A1','A73255B','A73293','A73295A','A73301A','A73302A','A73309A','A73311A','A73364','A73366','A73367','A73368','A73371','A73372','A73442','A73443','A73444','A73474','A73477','A73480','A73481','A73483','A73484','A73485','A73500','A73524R','A73532','A73533','A73551','A73564','A73567','A73568','A73597','A73604RA','A73607','A73609','A73630','A73631','A73633','A73662','A73676','A73677','A73713','A73717','A73730','A73735','A73742A','A73750','A73752','A73754','A73776','A73782','A73802','A73805','A73807','A73808','A73810','A73813','A73814','A73815','A73816','A73817','A73819','A73821','A73822','A73831','A73832','A73850','A73851','A73852','A73853','A73858','A73859','A73860','A73865','A73866','A73867','A73868','A73870','A73871','A73894A','A73895','A73896','A73897','A73905','A73906','A73907A','A73927','A73928','A73929','A73930','A73931','A73932','A73933','A73936','A73939','A73940','A73941','A73942','A73943','A73945','A73946','A73949','A73952','A73953','A73956','A73957','A73958','A73959','A73960','A73962','A73963','A73965','A73966','A73967','A73968','A73970','A73971','A73972','A73973','A73975','A73978','A73979','A73983','A73984','A73992','A74001','A74002','A74003','A74004','A74008','A74010','A74016','A74018','A74019','A74021','A74029','A74033','A74034','A74040','A74041','A74042','A74043','A74044','A74045','A74046','A74047','A74048','A74049','A74050','A74051','A74052','A74053','A74054','A74055','A74056','A74061','A74070','A74072','A74073','A74075','A74076','A74077','A74078','A74081','A74085','A74089A','A74090','A74091','A74095','A74096','A74097','A74098','A74100','A74104','A74110','A74113','A74114','A74115','A74116','A74120','A74124','A74126','A74127','A74128','A74130','A74133','A74134','A76865','A76866','A76867','A76873','A76884','A76894','A76896','A76897','A76898','A76899','A76900','A76901','A76902','A76904','A76907','A76911','A76912','A76914','A76916','A76917','A76925','A76926','A76927','A76931','A76934','A76935','A76936','A76937','A76938','A76939','A76940','A76945','A76949','A76950','A76951','A76955','A76965','A76973','A76974','A76976','A76978','A76979','A76983','A76985','A76989','A76990','A76991','A76992','A76993','A76994','A76995','A76998','A76999','A77000','A77001','A77004','A77005','A77006','A77008','A77014','A77015','A77016','A77017','A77018','A77019','A77020','A77036','A77037','A77040','A77041','A77042','A77044','A77045','A77046','A77047','A77048','A77052','A77053','A77054','A77055','A77056','A77057','A77060','A77061','A77072','A77073','A77080','A77081','A77082','A77083','A77084','A77085','A77088','A77089','A77093','A77094','A77095','A77096','A77097','A77098','A77099','A77100','A77101','A77102','A77105','A77106','A77107','A77108','A77109','A77111','A77113','A77115','A77116','A77119','A77120','A77122','A77123','A77125','A77126','A77127','A77128','A77129','A77130','A77150','A77151','A77152','A77154','A77155','A77156','A77157') and card_process1='passed' select * from cardMaster
where card_no
in ('104717','104789','104822','104823','104824','104825','104826','104827','104914A','104927AR','104937R','104943','104944','104945','104946','104947','104948','104961R','105145','105151','105156','105161','105162','105163','105171A','105172A','105211','105257','105269A','105334AR','105376A','105403A','105534','105551R','105557A','105567','105568','105569','105575','105654A','105654A1','105686A','105697A','105700A','105717R','105718R','105723A','105723B','105736R','105765','105774','105801A','105807','105811','105812','105813','105814','105820','105821','105896A','105900R','105900R2','105921B','105949R','105956','105976R1','106020','106030','106032','106033','106042R','106045A','106052A','106072','106073','106080','106081','106082','106083','106144','106147','106148R1','106171','106204R','106270','106285','106288','106344A1','106350R1','106354A','106368','106369','106376R11','106401','106402','106403','106404','106423R','106433','106434','106436','106439','106484A','106485R1','106486A','106486R','106495A','106495R','106518','106532','106565','106566','106567','106568','106569','106570','106571','106572','106573','106574','106575','106578','106579','106580','106602','106616','106617','106618','106620','106621','106717A','106718A','106718A1','106718R','106719','106743','106784','106787','106788','106789','106791','106792','106851','106852','106873','106880A','106882A','106894','106930','106936','106937','106974A','106975','106987A','107060','107061','107062','107066B','107073','107074','107091','107092','107120','107133','107135','107136','107162','107172','107173','107173R2','107174','107175','107176','107203','107204','107205','107225','107226','107227','107235','107236','107237','107238','107239','107240','107259R','107267','107268','107269','107270','107298A','107303','107304','107305','107339','107342','107343','107345','107347','107394','107395','107397','107400','107404','107406','107437A','107444','107445','107446','107448','107456A','107457A','107480','107481','107482','107483','107484','107485','107492R','107553A','107573A1','107583A','107615','107616','107618','107621','107626','107628','107631R2','107637','107646','107664','107665','107666','107667','107680','107689R','107695','107697','107698','107701','107702','107707B','107796','107797','107798','107799','107800','107810','107811','107812','107813','107814','107815','107816','107843','107846','107849','107851','107879','107880','107881','107888','107891','107893','107914A','107920A','107941','107943','107944','107945','108009R3','108022','108023','108024','108030','108031A','108032A','108052','108053','108068','108070','108071','108072','108082B','108103A1','108107A1','108111R','108115','108116','108117','108118','108129','108130','108131','108132','108133','108168A','108168B','108173A','108173R1','108183','108184','108185','108192R1','117112R','117129','117130','117131','117132','117149','117207','117214','117216','117221B','117222B','117227A','117263R','117265','117266','117267','117298','117322','117323','117324','117343','117344','117345R','117370','117374','117390','117391','117392','117405','117406','117407','117408','117503','117505','117506','117507','117615','117651','117698A','117704','117706','117708','117709','117710','117711','117712','117713','117714','117716','117717','117718','117719','117722','117723','117724','117731B','117749','117764','117778','117796A','117819A','117832R','117833R','117907','117910','117919','117922','117924','117926','118022','118058R','118066','118075','118087','118088','118090','118116','118117','118118','118119','118163','118173','118174','118175','118176','118177','118178','118179','118188','118206','118207','118208','118220','118221','118227','118231','118237','118238','118239','118246','118247','118248','118249','118250','118251','9A69953','A106529R','A58604AR','A58604R','A58610R1','A58634R3','A58648R','A58652R','A58686','A58785R1','A58785RA1','A58787AR','A58787R','A58787R1','A58804AR','A58804R','A58807','A58808R','A58812AR','A58812B1','A58816AR','A58816R','A58819R','A58821A','A58888A','A58888RA3','A58911','A58922A','A58958','A58980A','A58981R','A59044','A59045','A59083','A59084','A59087','A59147','A59148','A59157A1','A59206','A59206A','A59209A','A59217R','A59252A','A59273R','A59284','A59287','A59311','A59326R','A59363R','A59365R','A59374A','A59401','A59415','A59422','A59494','A59502R1','A59561R','A59564A','A59634R','A59653R','A59658R2','A59666','A59680R','A59681R','A59683R','A59722R','A59729','A59759','A59765R1','A59774','A59866','A59883A2','A59900R','A59903','A59937','A59954R1','A599656','A59969','A59975','A60001R','A60013A','A60019','A60027','A60088A','A60099','A60101','A60123R','A60269','A60349R','A60467','A60481A','A60482','A60491','A60492','A60577','A60623','A60654A','A60654B1','A60692A','A60702','A60763','A60764','A60788','A60797','A60802A','A60905','A60908','A60918','A60972','A61037A','A61039','A61041','A61050','A61057','A61191','A61194','A61195','A61211R','A61237','A61238','A61241','A61242','A61243','A61249','A61252','A61260','A61261','A61262','A61263','A61264','A61274','A61275','A61276','A61277','A61278','A61280','A61303','A61304','A61305','A61306','A61307','A61308','A61309','A61310','A61314','A61315','A61316','A61317','A61318','A61383R','A61398R','A61440','A61454AR','A61466R','A61480R1','A61512','A61524A','A61537R','A61538R','A61552','A61553','A61636','A61665','A61673A','A61773','A61801A','A61812','A61830R1','A61868','A61874A','A61893','A61894','A61908','A61985','A62008R','A62014','A62033','A62038A','A62056AB','A66206','A66274','A66275','A66285','A66289','A66290R','A66293','A66315','A66326A','A66371','A66397','A66426R','A66430A','A66438','A66474','A66484','A66512','A66513','A66538A','A66575','A66579','A66632','A66649','A66686','A66697','A66704R1','A66720','A66736','A66737','A66757R','A66800R1','A66833','A66882R','A66903R','A66913R','A66932','A66934','A66935','A66987','A67041','A67113A3','A67127','A67147','A67171','A67174','A67185','A67186','A67193R','A67221','A67236','A67237','A67277','A67285','A67289','A67315','A67336','A67350','A67375','A67389','A67393A','A67394A','A67449','A67610R','A67645A','A67656RA','A67663','A67665','A67666R','A67674','A67676','A67677','A67695','A67713A','A67718','A67756','A67771','A67790','A67824','A67825','A67830','A67831','A67836','A67837','A67856','A67889','A67899AR4','A67909R1','A67932R','A67933','A68009','A68012','A68013','A68014','A68015','A68052R','A68064','A68068','A68079','A68080','A68097R','A68105','A68112R2','A68126A','A68143','A68144','A68150','A68157','A68158','A68204','A68205','A68208','A68246','A68249','A68254','A68270A','A68331','A68348','A68349','A68368A','A68382','A68418B','A68420','A68478','A68498','A68521A','A68552A','A68559AR','A68569A','A68606','A68615','A68616','A68629A','A68671','A68687','A68688','A68689','A68691','A68692','A68697','A68739','A68741','A68742','A68778','A68779','A68809','A68820','A68850R','A68870','A68882','A68886R','A68887R','A68888R','A68890R','A68900','A68917','A68932','A68934','A68935','A68936R','A68941R2','A68970','A68990A','A68995A','A68996A','A68997A','A69015','A69031R','A69057R3','A69064A','A69095','A69107','A69108','A69113','A69115','A69134A3','A69150','A69177R','A69194','A69201','A69203','A69208','A69213','A69228','A69233','A69246A','A69249','A69271','A69272','A69273','A69274','A69275','A69284R','A69299','A69329','A69333B','A69349R','A69349R2','A69368','A69392','A69396','A69416R2','A69425R2','A69430','A69458','A69460','A69479A','A69537','A69555','A69562','A69592','A69593','A69616','A69618','A69661','A69667','A69692R','A69799R','A69844','A69855R2','A69871A','A69909','A69955','A69956','A69962','A69987','A69988','A70026','A70117R','A70128A','A70159','A70161','A70188','A70202','A70205','A70205A','A70212','A70240','A70254R','A70265A','A70273','A70279A','A70342','A70344','A70345','A70347','A70351','A70352','A70354A','A70389','A70440','A70441','A70442','A70444','A70526','A70531','A70619','A70621','A70622','A70699R','A70765','A70766','A70767','A707767','A70777','A70779','A70780','A70789','A70822R','A70860','A70864','A70875','A70881','A70882','A70921','A70941','A70953','A71060','A71074','A71075','A71076','A71077','A71133','A71134','A71135','A71144','A71145','A71146','A71147','A71148','A71166','A71190','A71191','A71194','A71221','A71223','A71224','A71226','A71259','A71264','A71275','A71276','A71277','A71278','A71305','A71316','A71359','A71360','A71361','A71422','A71423','A71434','A71447A','A71460R','A71512R','A71617','A71630R','A71662','A71671','A71722R','A71739','A71756','A71761','A71763','A71909','A71949','A71992','A71993','A72035R4','A72054','A72067','A72075R','A72085','A72091','A72092','A72093','A72094','A72095','A72096','A72097','A72098','A72107','A72120','A72122','A72133','A72140','A72145','A72156A','A72181A1','A72216','A72254R','A72274','A72282','A72284A','A72294','A72309','A72310','A72417','A72425','A72455','A72516R','A72525','A72614','A72644A','A72681','A72705R','A72707A','A72708','A72723','A72740','A72776','A72796','A72820','A72834','A72942AR1','A72971R2','A72972R','A72976RA2','A72999','A73000','A73018','A73019R','A73034','A73088A','A73111','A73115','A73116','A73166R','A73180R','A73194','A73196','A73231','A73237','A73255A1','A73255B','A73293','A73295A','A73301A','A73302A','A73309A','A73311A','A73364','A73366','A73367','A73368','A73371','A73372','A73442','A73443','A73444','A73474','A73477','A73480','A73481','A73483','A73484','A73485','A73500','A73524R','A73532','A73533','A73551','A73564','A73567','A73568','A73597','A73604RA','A73607','A73609','A73630','A73631','A73633','A73662','A73676','A73677','A73713','A73717','A73730','A73735','A73742A','A73750','A73752','A73754','A73776','A73782','A73802','A73805','A73807','A73808','A73810','A73813','A73814','A73815','A73816','A73817','A73819','A73821','A73822','A73831','A73832','A73850','A73851','A73852','A73853','A73858','A73859','A73860','A73865','A73866','A73867','A73868','A73870','A73871','A73894A','A73895','A73896','A73897','A73905','A73906','A73907A','A73927','A73928','A73929','A73930','A73931','A73932','A73933','A73936','A73939','A73940','A73941','A73942','A73943','A73945','A73946','A73949','A73952','A73953','A73956','A73957','A73958','A73959','A73960','A73962','A73963','A73965','A73966','A73967','A73968','A73970','A73971','A73972','A73973','A73975','A73978','A73979','A73983','A73984','A73992','A74001','A74002','A74003','A74004','A74008','A74010','A74016','A74018','A74019','A74021','A74029','A74033','A74034','A74040','A74041','A74042','A74043','A74044','A74045','A74046','A74047','A74048','A74049','A74050','A74051','A74052','A74053','A74054','A74055','A74056','A74061','A74070','A74072','A74073','A74075','A74076','A74077','A74078','A74081','A74085','A74089A','A74090','A74091','A74095','A74096','A74097','A74098','A74100','A74104','A74110','A74113','A74114','A74115','A74116','A74120','A74124','A74126','A74127','A74128','A74130','A74133','A74134','A76865','A76866','A76867','A76873','A76884','A76894','A76896','A76897','A76898','A76899','A76900','A76901','A76902','A76904','A76907','A76911','A76912','A76914','A76916','A76917','A76925','A76926','A76927','A76931','A76934','A76935','A76936','A76937','A76938','A76939','A76940','A76945','A76949','A76950','A76951','A76955','A76965','A76973','A76974','A76976','A76978','A76979','A76983','A76985','A76989','A76990','A76991','A76992','A76993','A76994','A76995','A76998','A76999','A77000','A77001','A77004','A77005','A77006','A77008','A77014','A77015','A77016','A77017','A77018','A77019','A77020','A77036','A77037','A77040','A77041','A77042','A77044','A77045','A77046','A77047','A77048','A77052','A77053','A77054','A77055','A77056','A77057','A77060','A77061','A77072','A77073','A77080','A77081','A77082','A77083','A77084','A77085','A77088','A77089','A77093','A77094','A77095','A77096','A77097','A77098','A77099','A77100','A77101','A77102','A77105','A77106','A77107','A77108','A77109','A77111','A77113','A77115','A77116','A77119','A77120','A77122','A77123','A77125','A77126','A77127','A77128','A77129','A77130','A77150','A77151','A77152','A77154','A77155','A77156','A77157') and card_process1='passed' CardMaster為一有3萬筆記錄的Table.card_no為primary Key.
中字符串由用戶操作而產生,不是從table中取得
運行此程式需1m11s.程式中多處需要用.
太慢,可有改良方法。
望賜教!!!!
|
yachanga
資深會員 ![]() ![]() ![]() ![]() ![]() 發表:24 回覆:335 積分:296 註冊:2003-09-27 發送簡訊給我 |
Hi kissdelphi您好:
理論上primary key 應該不會這樣慢??
請問是何種資料庫??
您的SQL 有兩個條件 card_no 和 card_process1 試試看下列兩個方法:
1. 增加一個index , column name 為card_no 和 card_process1
2. 若不想增加增加index, 先試試看只先考慮card_no 條件(card_process拿掉),應該會快很多吧?? 然後在程式端clientdataset 把card_process 過濾 ~悠遊法國號~
|
kissdelphi
一般會員 ![]() ![]() 發表:7 回覆:9 積分:3 註冊:2003-01-09 發送簡訊給我 |
引言: Hi kissdelphi您好: 理論上primary key 應該不會這樣慢?? 請問是何種資料庫?? 您的SQL 有兩個條件 card_no 和 card_process1 試試看下列兩個方法: 1. 增加一個index , column name 為card_no 和 card_process1 2. 若不想增加增加index, 先試試看只先考慮card_no 條件(card_process拿掉),應該會快很多吧?? 然後在程式端clientdataset 把card_process 過濾 ~悠遊法國號~---------------------------------------------------- sql server 2000. 其實字符串還有很多,我沒有copy全。 用in速率是很慢,採納你的建議,加上index,速度仍要1m5s. 可能隻有考慮其它改良方法。 |
peipei36
一般會員 ![]() ![]() 發表:8 回覆:51 積分:16 註冊:2002-03-13 發送簡訊給我 |
|
kissdelphi
一般會員 ![]() ![]() 發表:7 回覆:9 積分:3 註冊:2003-01-09 發送簡訊給我 |
本站聲明 |
1. 本論壇為無營利行為之開放平台,所有文章都是由網友自行張貼,如牽涉到法律糾紛一切與本站無關。 2. 假如網友發表之內容涉及侵權,而損及您的利益,請立即通知版主刪除。 3. 請勿批評中華民國元首及政府或批評各政黨,是藍是綠本站無權干涉,但這裡不是政治性論壇! |