Re: Limit select query results
Posted in 1997
Hi, I believe that a version of 7.2 has a feature to only return the first row (or a smaller set of rows). The catch is that performance of the further fetches suffers. Since you only want to first row is it possible to structure your query to return this first row? Also, 300000 isn't a huge table by today's standards Have you tried indexing? -Bill } } "Michael Sch'nborn" <nobody@qse.ser.tre> wrote: } } :Is there any possibility to limit the number of results of a select } :statement? } : } :We are working with a database with more than 300000 entries, so the } :performance is slow, if all entries match the query. Because this result is } :transmitted over the Network the answering time is very high. But in fact } :we do only need the first data that matches the query. } : } :We are using INFORMIX 7 with INTERSOLV 2.5 and Visual Basic under Windows } :3.11. } } If you use a cursor in Visual Basic you can read only the first row. } What's the problem? } } :Anyone has any clues, tips or tricks, please help me. } : } :I do appreciate any kindly help! Thank you. } } } Nils.Myklebust@idg.no } NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway } My opinions are those of my company } The Informix FAQ is at http://www.iiug.org } -- Bill Ennis Voice: 312-474-7516 SSA Fax: 312-474-7460 500 W. Madison email: ennis@ssax.com ennis@accesschicago.net