I'm just doing the select statement I mentioned in my first message. SELECT * FROM 'SPY' ORDER BY 1 ASC;
"1" is the column id which in my case I thought was a primary integer key. The "order by" clause I think is what causes the memory allocation of "aType" for each row. I did not create the primary key properly which someone pointed out. With a proper primary key, I was able to get rid of the ORDER BY clause and the per row memory allocation went away. This does point out however, that Win32 users who need to use ORDER BY on a large table are paying a hefty price. Thanks, Matt "D. Richard Hipp" <[EMAIL PROTECTED]> To 01/10/2005 12:58 sqlite-users@sqlite.org PM cc Subject Please respond to Re: [sqlite] excessive malloc() [EMAIL PROTECTED] calls te.org [EMAIL PROTECTED] wrote: > > I hacked the code to allocate the aType structure from a circular ring > buffer. This small change made my app go from spending 60% of its time in > malloc to about 3%. > I'm very interested in knowing what SQL statements you are running to obtain this result. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565