On Thu, Apr 2, 2009 at 12:01 PM, Igor Tandetnik <[email protected]> wrote:
> baxy77bax <[email protected]> wrote:
>> i need some help to see if i understood the point about indexing.
>>
>> if i have 2 tables. each table has 2 columns. and now i want to join
>> those tables through one column in each table:
>>
>> example
>> T1
>> C1 C2
>>>
>> +--+
>>      |
>> T2   |
>> C1 C2
>>
>> let say the columns in question are C1(t1) and C2(t2)
>> first question:
>> can i create index X1 in both columns C1(t1) and C2(t2) ?
>
> No. But you can of course create two indexes, one on T1(C1) and another
> on T2(C2). Though you would only need one of them to speed up the join.
>
>> and what is the
>> actual gain when i create indexes.
>
> The same you get from an index printed at the end of a textbook: it
> allows you to quickly look up a term and jump to the right page.

See http://www.mail-archive.com/[email protected]/msg37474.html
for a very, very nice explanation from Igor of how indexes work. The
explanation uses the same metaphor of an index in a text book as
described above by Igor.


>
> Igor Tandetnik
>
>
>




-- 
Puneet Kishor http://www.punkish.org/
Nelson Institute for Environmental Studies http://www.nelson.wisc.edu/
Carbon Model http://carbonmodel.org/
Open Source Geospatial Foundation http://www.osgeo.org/
Sent from Madison, WI, United States
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to