Skip to main content
Question

If i make Index for TextSearch, The source table would take a lock?

  • September 9, 2020
  • 3 replies
  • 12 views

HyeontaeJu
Forum|alt.badge.img+2

If i make Index for TextSearch, The source table would take a lock?
If the table is locked. How to make a index with out table lock?

3 replies

Vertica_Curtis
Forum|alt.badge.img+1
  • Participating Frequently
  • September 9, 2020

Are you making a text index?
Text indexes require unique primary keys, so if the table doesn't have one, you'll need to build one. That would probably lock the table, but I don't believe the actual create text index command locks the table. You could just copy the table data to a new table, and build the index on that. That wouldn't lock your original table, but the data would be static.


HyeontaeJu
Forum|alt.badge.img+2
  • Author
  • Participating Frequently
  • September 9, 2020

@Vertica_Curtis then, If i make a copy table and Index, The Index's table would not change if the source table's data in my think.
Is my think correct??


mosheg
Forum|alt.badge.img+2
  • Participating Frequently
  • September 9, 2020

After you create a text index on a given table, the text index is updated in the background for any change on that table.
See: https://www.vertica.com/docs/latest/HTML/Content/Authoring/AdministratorsGuide/Tables/TextSearch/TextSearchConceptual.htm