Re: [sqlite] Extra Space Required for Index ?

2013-10-30 Thread Simon Slavin
On 30 Oct 2013, at 6:32pm, Raheel Gupta wrote: > I wanted to create an INDEX (not unique) of the md5sum column. Would the > index also eat up 20 Bytes or more than that ? At least as much space as the total contents of all the md5sum values. Assuming you did a VACUUM

Re: [sqlite] Extra Space Required for Index ?

2013-10-30 Thread Raheel Gupta
>> B) By insisting on your email values being unique you have already required SQLite to make up an index for the column. SQLite needs that index so that when you do an INSERT it can quickly check to see that the value you use doesn't already exist. Agreed. I was just asking the general space

Re: [sqlite] Extra Space Required for Index ?

2013-10-30 Thread Simon Slavin
On 30 Oct 2013, at 8:37am, Raheel Gupta wrote: > email VARCHAR(255) UNIQUE NOT NULL > } > > I wanted to know if I create an INDEX for the column "email" what isg going > to be the extra space the index will occupy ? Two things: A) SQLite interprets "VARCHAR(255)" as

Re: [sqlite] Extra Space Required for Index ?

2013-10-30 Thread Clemens Ladisch
Raheel Gupta wrote: > CREATE TABLE users ( > uid INTEGER PRIMARY KEY AUTOINCREMENT, > username VARCHAR(100) UNIQUE NOT NULL DEFAULT '', > email VARCHAR(255) UNIQUE NOT NULL > > I wanted to know if I create an INDEX for the column "email" what isg going > to be the extra space the index will occupy

Re: [sqlite] Extra Space Required for Index ?

2013-10-30 Thread Stephan Beal
On Wed, Oct 30, 2013 at 9:37 AM, Raheel Gupta wrote: > I tried to search for any docs on this but couldnt. > This table is going to have 1 Million records and I need to save space > here. > Any any all storage-related requirements, with the possible exception of the page