Sorry Igor.

For ex, Employee has below columns:

column details:
1. seq_id as integer prmary key,
2. emp_id as STRING
3. emp_mngr_id as STRING
4. emp_id is UNIQUE

Programmatically, application converts integer to string  for emp_id
and emp_mngr_id columns to insert into Employee table.

I would like to know about how sqlite maintains emp_id column. It
always contains integers in string format.



On Thu, Oct 24, 2013 at 4:49 PM, Igor Tandetnik <[email protected]> wrote:
> On 10/24/2013 8:39 AM, dd wrote:
>>
>>    One of the column stores 'long long int' as string in database in
>> production. Internally, sqlite maintains it as a integer or text?
>
>
> I'm not sure I understand the question. Didn't you just say "stored as
> string"? What do you mean by that, if not "maintained as text"? What do you
> believe is the difference between the two?
>
> Anyway, run this query and see for yourself:
>
> select typeof(ColumnYouWantToKnowAbout), count(*) from
> TableYouWantToKnowAbout group by 1;
>
>
>>     If Text, is there any performance overhead if I write a query based
>> on this column?
>
>
> If it requires text to integer conversion, then most likely there is some.
>
>
>>     Can I get better performance If I write a query based on integer
>> column(with new schema or new column) rather than existing column?
>
>
> Quite possibly. Why don't you try that?
> --
> Igor Tandetnik
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to