1.0

Table Of Contents
NotesSupport levelQuery type
Correlated subquery with inner query of
replicated table on page 660
SupportedCorrelated subquery with inner query of a
replicated table
Correlated subquery with outer query of a
replicated table inner query of a partitioned
table on page 660
Not SupportedCorrelated subquery with outer query of a
replicated table inner query having one or
more partitioned tables
The sections that follow use the following set of example tables to describe query support and limitations.
create table trade.securities (sec_id int not null, symbol varchar(10) not
null,
price decimal (30, 20), exchange varchar(10) not null, tid int,
constraint sec_pk primary key (sec_id) )replicate
create table trade.customers (cid int not null, cust_name varchar(100),
since date, addr varchar(100), tid int, primary key (cid))
partition by column (cust_name)
create table trade.portfolio (cid int not null, sid int not null, qty int
not null, availQty int not null, subTotal decimal(30,20),
tid int, constraint portf_pk primary key (cid, sid), constraint cust_fk
foreign key (cid) references trade.customers (cid) on delete restrict,
constraint sec_fk foreign key (sid) references trade.securities
(sec_id)) partition by column (cid) colocate with (trade.customers)
create table trade.sellorders (oid int not null constraint orders_pk primary
key, cid int, sid int, qty int, ask decimal (30, 20),
status varchar(10) default 'open', tid int, constraint portf_fk foreign
key (cid, sid) references trade.portfolio (cid, sid)) replicate
create table trade.networth (cid int not null, cash decimal (30, 20),
securities decimal (30, 20), loanlimit int, availloan decimal (30, 20),
tid int, constraint netw_pk primary key (cid), constraint cust_newt_fk
foreign key (cid) references trade.customers (cid) on delete restrict )
partition by column (cid) colocate with(trade.customers)
create table trade.buyorders(oid int not null constraint buyorders_pk primary
key, cid int, sid int, qty int, bid decimal (30, 20), status varchar(10),
tid int, constraint bo_sec_fk foreign key (sid) references
trade.securities (sec_id) on delete restrict) partition by column (cid)
In the above system, securities and sellorders are replicated tables, while customers, portfolio,networth and
buyorders are partitioned tables. The portfolio and networth tables are colocated with customers, partitioned on
cid column. The buyorders table is not colocated with any of the partitioned tables.
All tables are assigned to the default server group.
657
vFabric SQLFire Limitations