Portál AbcLinuxu, 3. listopadu 2025 20:44
switch sDbName %Query only a single row where possible for speed
case {'MySQL'}
e = exec(connect,['select ' insertField ' from ' tableName ' LIMIT 0']);
case {'Microsoft SQL Server','ACCESS'}
e = exec(connect,['select TOP 1 ' insertField ' from ' tableName]);
case {'Oracle'}
e = exec(connect,['select ' insertField ' from ' tableName ' where ROWNUM <= 1']);
case{'PostGreSQL'}
e = exec(connect,['select ' insertField ' from ' tableName ' LIMIT 1']);
otherwise
e = exec(connect,['select ' insertField ' from ' tableName]);
end
Takže je jasné co to dělá.. .. načítá to celou tabulku, která jak roste tak to dříve nebo později chcípne...
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.