Hi, all, i am curious whether there are tools out there which can show the relative amounts of space used by tables in a db? i have no concrete need for one, i'm just curious.
Curiosity being the step-mother of invention, though, here's a quick hack which does this for Linux... [stephan@host:~/cvs/fossil]$ t=$(echo "select name from sqlite_master where type='table';" | sqlite3 fossil.fsl) [stephan@host:~/cvs/fossil]$ for i in $t; do echo ".dump $i" | sqlite3 fossil.fsl > d.$i; done [stephan@host:~/cvs/fossil]$ ls -la d.* | awk '{printf("%8d %s\n",$5, $9);}' | sort -n 102 d.unsent 172 d.orphan 177 d.phantom 580 d.private 2526 d.unclustered 5207 d.reportfmt 6118 d.shun 7553 d.rcvfrom 9062 d.user 11838 d.leaf 22723 d.attachment 40730 d.concealed 48066 d.config 50218 d.filename 90695 d.backlink 98559 d.tag 340074 d.ticketchng 443123 d.plink 688172 d.delta 1241733 d.mlink 1429201 d.tagxref 1585698 d.ticket 2283276 d.event 47098047 d.blob from there calculating the relative sizes (i'm not interested in absolute sizes) is just one more step. -- ----- stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users