Create index uses Hbase apis to upsert data to Hbase. Async option gives you a Mapreduce command to run. I think it bypasses a few things and writes the data straight into store files. Each global index is in a separate Hbase table, local indexes behave differently.
> On Jun 3, 2017, at 11:50 PM, WangWeiyi <c...@foxmail.com> wrote: > > Jonathan, > > Thank you for response. > > If I use "create index" command to build a global index on an existing table, > what does Phoenix do behind this command? How Phoenix build global index? > > > ------------------ Original ------------------ > From: "Jonathan Leech";<jonat...@gmail.com>; > Date: Sun, Jun 4, 2017 01:26 PM > To: "user"<user@phoenix.apache.org>; > Subject: Re: build index on existing big table > > Give Hbase region servers lots of memory, set number of Hbase store files and > blocking files way high. Major compact before and after. You can create an > index a sync with map reduce but not rebuild AFAIK. Also if rebuilding one or > more local index, I found it better to drop it first in Hbase, preserving the > splits. > > > On Jun 3, 2017, at 12:36 AM, co2y <c...@foxmail.com> wrote: > > > > Hi everyone, > > > > I am creating index on an existing big table, it is very slow. Sometimes, > > it is stuck in “BUILDING” state. > > > > When building index on an existing big table, does it upsert data into > > index table? Is there any other approaches like MapReduce to build index on > > existing tables? > > > > Thank you! > >