Thanks Sergey, The upserts are much faster via command line or a GUI tool like Aquadata Studio.
Table structure is below. I'm creating a new user with 8 permissions. So 9 total upserts. Individually, via command line, this is almost instantaneous. But via JDBC, it takes tens of seconds to minutes. create table user ( user_id varchar (40) not null, password_hash varchar (200) , user_full_name varchar (40), user_email_address varchar (60), token varchar ( 36), expiration date CONSTRAINT pk_user PRIMARY KEY (user_id) ); create table user_access( user_id varchar(30) not null , screen_id tinyint not null, --key to sda.screen access_id tinyint --key to sda.screen_access CONSTRAINT pk_user_access PRIMARY KEY (user_id, screen_id) ); -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Sergey Soldatov Sent: Friday, February 19, 2016 3:01 AM To: [email protected] Subject: Re: Multiple upserts via JDBC Hi Zack, Have you tried to use sqlline to manually do those upserts to check the performance? Information about the tables structures would be useful as well. Thanks, Sergey On Tue, Feb 16, 2016 at 8:10 AM, Riesland, Zack <[email protected]> wrote: > I have a handful of VERY small phoenix tables (< 100 entries). > > > > I wrote some javascript to interact with the tables via servlet + JDBC. > > > > I can query the data almost instantaneously, but upserting is > extremely slow – on the order of tens of seconds to several minutes. > > > > The main write operation does 10 upserts. Is there a better way to do > this than 10 separate statement.execute() commands? > > > > Is there a way to pass all 10 at once? > > > > Any tips on why these upserts might be so slow? I see that the tables > are backed by one region, so the overhead should be minimal. > > > > Thanks! > >
