nevermind - i found it:

"Hi,
>  Does H2 automatically create indices for foreign key constraints?

Yes: The required indexes are automatically created if required. I
will add this to the docs.
>  is it correct to assume that H2 will automatically create an index on
>  the bar_id column of the above table?  So the following statement
>  would be redundant:
>  create index foo_idx1 on foo(bar_id); ?

Yes. But if you create this index before creating the foreign key, it
will be used and no additional (system-) index will be created.
Regards,
Thomas"



On Monday, 25 June 2012 14:22:22 UTC+1, h2_mad wrote:
>
> Hi,
>
> In responce to this then:
>
> "No, search not. But inserting / updating / deleting rows will become 
> slower, because additional indexes need to be maintained."
>
> how would i stop the auto-index creation when i've already explicitly 
> created the same index?
>
> thanks
>
> m
>
>
> On Tuesday, 20 September 2011 07:09:43 UTC+1, Thomas Mueller wrote:
>>
>> Hi,
>>
>> 1) does H2 db, creates it's own indexes for primary key and unique
>>> constraints, automatically?
>>>
>>
>> Yes.
>>  
>>
>>> 2) if we also create our own indexes with different names for same
>>> primary-key ,
>>> will it still allow 2 indexes ( different names) for same primary
>>> key,
>>>
>>
>> Yes.
>>  
>>
>>> if so, does search becomes little slow..
>>
>>
>> No, search not. But inserting / updating / deleting rows will become 
>> slower, because additional indexes need to be maintained.
>>
>> Regards,
>> Thomas
>>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/F6ravkGl0p4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to