Hi,
I have the following Table :
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
On Wed, Oct 30, 2013 at 9:37 AM, Raheel Gupta raheel...@gmail.com 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 size[1],
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 ?
About
On 30 Oct 2013, at 8:37am, Raheel Gupta raheel...@gmail.com 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 TEXT. Each
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
On 30 Oct 2013, at 6:32pm, Raheel Gupta raheel...@gmail.com 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 before