Re: [sqlite] Sqlite flash and mallocs.

2006-07-31 Thread Mario . Hebert
Agree. Actually, I should have instead created the same database on the 
windoze port and see if the numbers are the same. 

Mario





[EMAIL PROTECTED] wrote:
> 
> Is it normal it takes 13,000 mallocs 
> 

That depends on your database schema and the data you
are storing. 
--
D. Richard Hipp   <[EMAIL PROTECTED]>




Re: [sqlite] Sqlite flash and mallocs.

2006-07-28 Thread drh
[EMAIL PROTECTED] wrote:
> 
> Is it normal it takes 13,000 mallocs 
> 

That depends on your database schema and the data you
are storing.  
--
D. Richard Hipp   <[EMAIL PROTECTED]>



[sqlite] Sqlite flash and mallocs.

2006-07-28 Thread Mario . Hebert
I am saving a simple database (4-5 tables and few records inside). The 
total size of the database once flashed is 9216 bytes.

I execute the following query:

snprintf(query, MAX_SQLITE_QUERY_LEN,
  "attach database %s as %s;"
  "BEGIN;"
  "create table if not exists %s.%s as select * from 
%s;" 
  "delete from %s.%s;"
  "insert into %s.%s select * from %s;"
  "COMMIT;"
  "detach database %s", 
  database, database,
  database, table, table,
  database, table,
  database, table, table,
  database );

Is it normal it takes 13,000 mallocs 

Our mallocs is not the fastest and well, as you can imagine it takes 
forever to flash it (even if it works!).

Mario Hebert
Legerity