This repository has been archived by the owner on Aug 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix Twitter Postgres/NoisePage DDL files
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
src/com/oltpbenchmark/benchmarks/twitter/ddls/twitter-noisepage-ddl.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
DROP TABLE IF EXISTS user_profiles CASCADE; | ||
CREATE TABLE user_profiles ( | ||
uid int NOT NULL, | ||
name varchar(255) DEFAULT NULL, | ||
email varchar(255) DEFAULT NULL, | ||
partitionid int DEFAULT NULL, | ||
partitionid2 int DEFAULT NULL, | ||
followers int DEFAULT NULL, | ||
PRIMARY KEY (uid) | ||
); | ||
CREATE INDEX IDX_USER_FOLLOWERS ON user_profiles (followers); | ||
CREATE INDEX IDX_USER_PARTITION ON user_profiles (partitionid); | ||
|
||
DROP TABLE IF EXISTS followers; | ||
CREATE TABLE followers ( | ||
f1 int NOT NULL, | ||
f2 int NOT NULL, | ||
PRIMARY KEY (f1,f2) | ||
); | ||
|
||
DROP TABLE IF EXISTS follows; | ||
CREATE TABLE follows ( | ||
f1 int NOT NULL, | ||
f2 int NOT NULL, | ||
PRIMARY KEY (f1,f2) | ||
); | ||
|
||
DROP TABLE IF EXISTS tweets; | ||
CREATE TABLE tweets ( | ||
id bigint NOT NULL, | ||
uid int NOT NULL, | ||
text char(140) NOT NULL, | ||
createdate date DEFAULT NULL, | ||
PRIMARY KEY (id) | ||
); | ||
CREATE INDEX IDX_TWEETS_UID ON tweets (uid); | ||
|
||
DROP TABLE IF EXISTS added_tweets; | ||
CREATE TABLE added_tweets ( | ||
id bigint NOT NULL, | ||
uid int NOT NULL, | ||
text char(140) NOT NULL, | ||
createdate date DEFAULT NULL, | ||
PRIMARY KEY (id) | ||
); | ||
CREATE INDEX IDX_ADDED_TWEETS_UID ON added_tweets (uid); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters