osdir.com
mailing list archive

Subject: Re: Size of each row - msg#00107

List: db.sqlite.general

Date: Prev Next Index Thread: Prev Next Index
--- In sqlite-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx, "D. Richard Hipp"
<drh@xxxx> wrote:
> Wojtek DHAS wrote:
> > Maybe it would be possible to introduced such functionality like
> > Compacting sqlite database - like for example in MSAccess it is
done?
> >
>
> sqlite old.db .dump | sqlite new.db
> mv old.db new.db
>
**********************************
My task requires me to delete all the rows pretty often and I feel it
would be nice to compact the database whenever I delete them. What
commands should I include in my source code to compact the database.
Just FYI: I am going to run SQLite on both Windows and Unix.

Thanks


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





Was this page helpful?
Yes No
Thread at a glance:

Previous Message by Date: click to view message preview

Re: Size of each row

> Wojtek DHAS wrote: > > Maybe it would be possible to introduced such functionality like > > Compacting sqlite database - like for example in MSAccess it is done? > > > > sqlite old.db .dump | sqlite new.db > mv old.db new.db Probably you mean mv new.db old.db ;-) BTW: A function for doing this at the C-API level would be nice. But I do not really need it very often, so the solution you have shown is sufficient for me... -- Danny Reinhold Reinhold Software & Services ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

Next Message by Date: click to view message preview

Re: order of insertion saved?

--- In sqlite-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx, Colin Shum <tachyon@xxxx> wrote: > Hi all: > > I am wondering if the order of insertion is saved in sqlite. I stored a > set of random numbers (segment_id) in a table, where each number has a > corresponding prog_id and pdigest_id. Here is the results after: > > > "select * from table1" > > prog pdigest_id segment_id > ---- ------------ ---------- > 123 1 1 > 123 1 8 > 123 1 4 > 123 1 2 > 123 1 6 > 123 1 3 > 123 1 5 > 123 1 7 > > "select * from table1 where program_id = 123;" > prog pdigest_id segment_id > ---- ------------ ---------- > 123 1 1 > 123 1 2 > 123 1 3 > 123 1 4 > 123 1 5 > 123 1 6 > 123 1 7 > 123 1 8 > > > Is there a way to keep the randomness of "segment_id" without using > a extra timestamp or counter? purely by the order of insertion? Quoting from the docs: If a table does not have an INTEGER PRIMARY KEY column, then the B- Tree key will be a automatically generated integer. The B-Tree key for a row can always be accessed using one of the special names "ROWID", "OID", or "_ROWID_". This is true regardless of whether or not there is an INTEGER PRIMARY KEY. So try appending "ORDER BY ROWID" to your query. You can append DESC to get the reverse order (latest first). Jim Lyon ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

Previous Message by Thread: click to view message preview

Re: Size of each row

> Wojtek DHAS wrote: > > Maybe it would be possible to introduced such functionality like > > Compacting sqlite database - like for example in MSAccess it is done? > > > > sqlite old.db .dump | sqlite new.db > mv old.db new.db Probably you mean mv new.db old.db ;-) BTW: A function for doing this at the C-API level would be nice. But I do not really need it very often, so the solution you have shown is sufficient for me... -- Danny Reinhold Reinhold Software & Services ------------------------ Yahoo! Groups Sponsor ---------------------~--> Get 128 Bit SSL Encryption! http://us.click.yahoo.com/CBxunD/vN2EAA/xGHJAA/EbFolB/TM ---------------------------------------------------------------------~-> To unsubscribe from this group, send an email to: sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

Next Message by Thread: click to view message preview

RE: Re: Size of each row

I guess there is no such function in dll   Wojtek -----Original Message-----From: richa_verma77 <richa_verma77-/E1597aS9LQAvxtiuMwx3w@xxxxxxxxxxxxxxxx> [mailto:richa_verma77-/E1597aS9LQAvxtiuMwx3w@xxxxxxxxxxxxxxxx]Sent: Friday, December 13, 2002 4:56 PMTo: sqlite-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxxSubject: [sqlite] Re: Size of each row--- In sqlite-hHKSG33TihhbjbujkaE4pw@xxxxxxxxxxxxxxxx, "D. Richard Hipp" <drh-KGpdMs7P1Kc@xxxxxxxxxxxxxxxx> wrote:> Wojtek DHAS wrote:> > Maybe it would be possible to introduced such functionality like > > Compacting sqlite database  - like for  example in MSAccess it is done?> >  > >    sqlite old.db .dump | sqlite new.db>    mv old.db new.db> **********************************My task requires me to delete all the rows pretty often and I feel it would be nice to compact the database whenever I delete them. What commands should I include in my source code to compact the database. Just FYI: I am going to run SQLite on both Windows and Unix.ThanksTo unsubscribe from this group, send an email to:sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxxYour use of Yahoo! Groups is subject to the Yahoo! Terms of Service. To unsubscribe from this group, send an email to: sqlite-unsubscribe-VgYJa0VH1e9BDgjK7y7TUQ@xxxxxxxxxxxxxxxx Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
Sign up for updates to this mailing list. email:
Loading Comments...
Home | News | Patents | Sitemap | FAQ | advertise

Advertising by