Skip to content

Instantly share code, notes, and snippets.

@gnumoreno
Last active November 1, 2019 14:11
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save gnumoreno/c24a3cc0d6633f1d38103be5f3511767 to your computer and use it in GitHub Desktop.
Save gnumoreno/c24a3cc0d6633f1d38103be5f3511767 to your computer and use it in GitHub Desktop.
MVSI

Pick a scylla version: https://hub.docker.com/r/scylladb/scylla/tags

This tuturial was created with 3.1.0.rc9 on Linux

Create a docker container with scylla

Docker Documentation

docker run --name scylla-si -d scylladb/scylla:3.1.0 --smp 2 --memory 4G

Open a terminal to the container and download the example file

docker exec -ti scylla-si /bin/bash
yum install wget -y
wget https://gist.githubusercontent.com/gnumoreno/c24a3cc0d6633f1d38103be5f3511767/raw/df7ca6ca975512c3e5b149984970a53a78115eeb/tallest_buildings.csv

Run CQLSH

CQLSH Documentation

cqlsh

Base Table

CQLSH first steps: Creating keyspace, table and importing data using the copy commmand.

  1. Download the tallest_buildings.csv to a scylla node. https://gist.github.com/gnumoreno/c24a3cc0d6633f1d38103be5f3511767
  2. Create a keyspace "architecture"
CREATE KEYSPACE architecture 
  WITH replication = 
  {'class': 'SimpleStrategy', 'replication_factor': '1'}  
  AND durable_writes = true;
  1. Create a table "buildings" with columns: building, city, country, height_meters, height_feet, floors, year. Make the column "building" your primary key.
CREATE TABLE architecture.buildings (
    building text,
    city text,
    country text,
    height_meters smallint,
    height_feet smallint,
    floors tinyint,
    year smallint,
    PRIMARY KEY (building));
  1. Using the COPY command, import the csv data into the table you created.
COPY architecture.buildings 
  FROM 'tallest_buildings.csv' 
  WITH HEADER = TRUE;

From the output of the COPY command, what went wrong?

CORRECTING the TABLE SCHEMA 1: TRUNCATING, ALTER, COPY with columns, COUNT

  1. Delete all the data in the "buildings" table
TRUNCATE architecture.buildings ;
  1. Using alter table, correct all the problems you saw in the previous exercise in you data modeling. Re-import the data again.
ALTER TABLE architecture.buildings 
  DROP height_meters;
  
ALTER TABLE architecture.buildings 
  DROP floors ;
  
ALTER TABLE architecture.buildings 
  ADD height_meters decimal;
  
ALTER TABLE architecture.buildings 
  ADD floors smallint;

COPY architecture.buildings (
  building,
  city,
  country,
  height_meters,
  height_feet,
  floors,
  year
  )
  FROM 'tallest_buildings.csv' 
  WITH HEADER = TRUE;
  
  SELECT count(*) from architecture.buildings;

Why there is a difference between the number of entries in the csv file and the number of entries in the table?

CORRECTING the TABLE SCHEMA 2: ADD CLUSTERING, COPY, COUNT, SELECT IN

  1. To resolve the problem from the previous exercise, remove the table from the schema, create the table again with the proper data modeling and re-import the data. Make sure that this time we have the desired result!
DROP TABLE architecture.buildings ;

CREATE TABLE architecture.buildings (
    building text,
    city text,
    country text,
    height_meters decimal,
    height_feet smallint,
    floors smallint,
    year smallint,
    PRIMARY KEY (building,city));
    
COPY architecture.buildings (
  building,
  city,
  country,
  height_meters,
  height_feet,
  floors,
  year
  )
  FROM 'tallest_buildings.csv' 
  WITH HEADER = TRUE;
  
SELECT count(*) from architecture.buildings;
  1. Using the IN clause, select multiple buildings from the table.
SELECT * from architecture.buildings 
  WHERE building IN 
  (
  'Chase Tower',
  'Aon Center',
  'Bank of America Plaza',
  'Trump International Hotel and Tower'
  );

Materialized Views

Materialized Views Documentation

Creating Materialized Views

  1. Create a MV with the partitioning key being column "city", the clustering key being the "building" and with all columns being regular columns.
USE architecture;

CREATE MATERIALIZED VIEW building_by_city AS
        SELECT * FROM buildings
        WHERE building IS NOT NULL AND city IS NOT NULL
        PRIMARY KEY(city, building);
        
SELECT * FROM building_by_city LIMIT 10;
  1. Try to create a MV using the column "year" as the partitioning key and "building" as the clustering key, Include all other columns as regular columns.
CREATE MATERIALIZED VIEW building_by_year AS
        SELECT * FROM buildings
        WHERE building IS NOT NULL
        AND year IS NOT NULL
        PRIMARY KEY(year, building);
InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot create Materialized View building_by_year without primary key columns from base buildings (city)"

Why do we get the above error?

  1. Correct way to create a MV
CREATE MATERIALIZED VIEW building_by_year AS
        SELECT * FROM buildings
        WHERE building IS NOT NULL AND city IS NOT NULL
        AND year IS NOT NULL
        PRIMARY KEY(year, city, building);
        
SELECT * FROM building_by_year 
  WHERE year = 2012;
  

Why the above command works in comparison to the previous one?

  1. Try to create a MV with the partition key being the columns: "year, height_meters, building, city) and all other columns as regular columns.
CREATE MATERIALIZED VIEW building_by_year_height_meters AS
        SELECT * FROM buildings
        WHERE building IS NOT NULL AND city is NOT NULL 
        AND year IS NOT NULL AND height_meters IS NOT NULL
        PRIMARY KEY(year, height_meters, building, city);
InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot include more than one non-primary key column 'height_meters' in materialized view primary key"
  1. Let's create MVs with different sorting orders using the column "country" as the partitioning key.
CREATE MATERIALIZED VIEW building_by_country AS
        SELECT * FROM buildings
        WHERE building IS NOT NULL AND city IS NOT NULL
        AND country IS NOT NULL
        PRIMARY KEY(country, city, building)
        WITH CLUSTERING ORDER BY (city DESC, building ASC);

CREATE MATERIALIZED VIEW building_by_country_reverse AS
        SELECT * FROM buildings
        WHERE building IS NOT NULL AND city IS NOT NULL
        AND country IS NOT NULL
        PRIMARY KEY(country, city, building)
        WITH CLUSTERING ORDER BY (city ASC, building DESC);
  1. Compare the MVs you created.
SELECT * FROM building_by_country 
  WHERE country = 'USA' 
  AND city IN ('Chicago', 'New York City');

SELECT * FROM building_by_country_reverse
  WHERE country = 'USA' 
  AND city IN ('Chicago', 'New York City');

Open 3 terminals (#1 for base table, #2 for global index, #3 for local index)

Indexes

Index Documentation

BASE TABLE - On terminal #1

  1. Create a table with some data.
docker exec -ti scylla-si /bin/bash
cqlsh

CREATE KEYSPACE restaurant_chain 
    WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };

USE restaurant_chain;

CREATE TABLE restaurant_chain.menus (
    location text,
    name text,
    dish_type text,
    price float,
    PRIMARY KEY (location, name));

INSERT INTO menus (location, name, price, dish_type) VALUES ('Reykjavik', 'hakarl', 16, 'cold Icelandic starter');
INSERT INTO menus (location, name, price, dish_type) VALUES ('Reykjavik', 'svid', 21, 'hot Icelandic main dish');
INSERT INTO menus (location, name, price, dish_type) VALUES ('Warsaw', 'sour rye soup', 7, 'Polish soup');
INSERT INTO menus (location, name, price, dish_type) VALUES ('Warsaw', 'sorrel soup', 5, 'Polish soup');
INSERT INTO menus (location, name, price, dish_type) VALUES ('Cracow', 'beef tripe soup', 6, 'Polish soup');
INSERT INTO menus (location, name, price, dish_type) VALUES ('Warsaw', 'pork jelly', 8, 'cold Polish starter');
INSERT INTO menus (location, name, price, dish_type) VALUES ('Ho Chi Minh', 'bun mam', 8, 'Vietnamese soup');
INSERT INTO menus (location, name, price, dish_type) VALUES ('Da Lat', 'banh mi', 5, 'Vietnamese breakfast');
INSERT INTO menus (location, name, price, dish_type) VALUES ('Ho Chi Minh', 'goi cuon', 6, 'Vietnamese hot starter');

SELECT * from restaurant_chain.menus;
  1. Now let's run some queries.
SELECT * FROM restaurant_chain.menus;

But wait! This is a full table scan. I'm glad we have very little data. We should always restrict our queries using partition keys.

SELECT * FROM menus where location = 'Warsaw';

If we had a lot of data this would perform very well.

  1. But what if I wanted to query by other fields? Let's try.
SELECT * from menus where dish_type = 'Polish soup';

ooops!

InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING"
SELECT * from menus where location = 'Warsaw' and dish_type = 'Polish soup';

ooops! [2]

InvalidRequest: Error from server: code=2200 [Invalid query] message="Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING"

If we add "ALLOW FILTERING" to the above queries they would work. But just like our first query, because we are querying regular columns it would be a full table scan - VERY INEFFICIENT!

Indexes to the rescue!

  1. Let's take a look at our current schema and sstables. It will help us compare and contrast and further our understanding.
DESC KEYSPACE restaurant_chain;
exit
nodetool flush

cd /var/lib/scylla/data/restaurant_chain/
ls -l */*

GLOBAL INDEX - On terminal #2

docker exec -ti scylla-si /bin/bash
cqlsh

USE restaurant_chain;

CREATE INDEX ON menus(dish_type);

SELECT * from menus where dish_type = 'Polish soup'; 

DESC KEYSPACE restaurant_chain;

exit
nodetool flush

cd /var/lib/scylla/data/restaurant_chain/
ls -l */*

LOCAL INDEX - On terminal #3

docker exec -ti scylla-si /bin/bash
cqlsh

USE restaurant_chain;

CREATE INDEX ON menus((location),dish_type);

SELECT * from menus where location = 'Warsaw' and dish_type = 'Polish soup';

DESC KEYSPACE restaurant_chain;

exit
nodetool flush

cd /var/lib/scylla/data/restaurant_chain/
ls -l */*

Inspecting sstables for a better understanding

NOTE: The directories and files below are hypothetical. You should get the correct names from the ls -l */* (last command ran in each terminal).

  1. Let's inspect our sstables and see how data is stored on disk.

BASE TABLE - On terminal #1

sstabledump menus-76bce980e9e711e9b4a6000000000001/mc-2-big-Data.db

GLOBAL INDEX - On terminal #2

sstabledump menus_dish_type_idx_index-11248001e9e811e9b4a6000000000001/mc-2-big-Data.db

LOCAL INDEX - On terminal #3

sstabledump menus_dish_type_idx_1_index-bac41d51e9e811e9b4a6000000000001/mc-2-big-Data.db

Extra points - Inspecting Tokens

First, you should read a little bit on the subject.

Scylla Ring Architecture

Token

On any terminal:

cqlsh

USE restaurant_chain;

SELECT token(location), location, name, dish_type, price 
  FROM restaurant_chain.menus;

SELECT token(dish_type), dish_type, blobAsBigint(idx_token), location, name 
  FROM restaurant_chain.menus_dish_type_idx_index;
  
SELECT token(location), location, dish_type, name 
  FROM restaurant_chain.menus_dish_type_idx_1_index;

Compare the token values from the base table and the underlying MVs of each index and ask yourself: Why local indexes are local and why global indexes are global?

building city country height_meters height_feet floors year
Burj Khalifa Dubai UAE 828 2717 163 2010
Shanghai Tower Shanghai China 632 2073 121 2014
Makkah Royal Clock Tower Hotel Mecca Saudi Arabia 601 1971 120 2012
One World Trade Center New York City USA 541.3 1776 104 2013
Taipei 101 Taipei Taiwan 509 1670 101 2004
Shanghai World Financial Center Shanghai China 492 1614 101 2008
International Commerce Centre Hong Kong Hong Kong 484 1588 118 2010
Petronas Tower 1 Kuala Lumpur Malaysia 452 1483 88 1998
Petronas Tower 2 Kuala Lumpur Malaysia 452 1483 88 1998
Zifeng Tower Nanjing China 450 1476 89 2010
Willis Tower (Formerly Sears Tower) Chicago USA 442 1450 108 1973
Kingkey 100 Shenzhen China 442 1449 100 2011
Guangzhou International Finance Center Guangzhou China 440 1440 103 2010
Dream Dubai Marina Dubai UAE 432 1417 101 2014
Trump International Hotel and Tower Chicago USA 423 1389 98 2009
Jin Mao Tower Shanghai China 421 1380 88 1999
Princess Tower Dubai UAE 414 1358 101 2012
Al Hamra Firdous Tower Kuwait City Kuwait 413 1354 77 2011
2 International Finance Centre Hong Kong Hong Kong 412 1352 88 2003
23 Marina Dubai UAE 395 1296 89 2012
CITIC Plaza Guangzhou China 391 1283 80 1997
Shun Hing Square Shenzhen China 384 1260 69 1996
Central Market Project Abu Dhabi UAE 381 1251 88 2012
Empire State Building New York City USA 381 1250 102 1931
Elite Residence Dubai UAE 380.5 1247 87 2012
Tuntex Sky Tower Kaohsiung Taiwan 378 1240 85 1997
Central Plaza Hong Kong Hong Kong 374 1227 78 1992
Bank of China Tower Hong Kong Hong Kong 367 1205 70 1990
Bank of America Tower New York City USA 366 1200 54 2009
Almas Tower Dubai UAE 363 1191 68 2009
The Pinnacle Guangzhou China 360 1181 60 2012
SEG Plaza Shenzhen China 356 1168 70 2000
JW Marriott Marquis Dubai Tower 1 Dubai UAE 355 1166 82 2012
JW Marriott Marquis Dubai Tower 2 Dubai UAE 355 1166 82 2013
Emirates Office Tower Dubai UAE 355 1163 54 2000
Aon Center Chicago USA 346 1136 83 1973
The Center Hong Kong Hong Kong 346 1135 73 1998
Keangnam Hanoi Landmark Tower Hanoi Vietnam 345 1132 72 2011
John Hancock Center Chicago USA 344 1128 100 1969
Ahmed Abdul Rahim Al Attar Tower Dubai UAE 342 1122 76 2010
Mercury City Tower Moscow Russia 339 1112 75 2012
Hefei Feicui TV Tower Hefei China 339 1112 75 2012
Tianjin World Financial Center Tianjin China 337 1105 79 2010
The Marina Torch Dubai UAE 337 1105 79 2011
Shimao International Plaza Shanghai China 333 1094 61 2005
Rose Tower Dubai UAE 333 1093 72 2007
Modern Media Center Changzhou China 332 1089 57 2012
Minsheng Bank Building Wuhan China 331 1087 68 2007
China World Trade Center Tower 3 Beijing China 330 1083 74 2009
Ryugyong Hotel Pyongyang North Korea 330 1083 105 1992
The Index Dubai UAE 328 1076 80 2010
Al Yaqoub Tower Dubai UAE 328 1076 69 2013
Longxi International Hotel Huaxi Village China 328 1076 72 2011
The Landmark Abu Dhabi UAE 324 1072 72 2012
Deji Plaza Phase 2 Nanjing China 324 1072 62 2013
Q1 Gold Coast Australia 323 1058 80 2005
Wenzhou World Trade Center Wenzhou China 322 1056 68 2010
Burj Al Arab Dubai UAE 321 1053 60 1999
Nina Tower Hong Kong Hong Kong 319 1049 80 2007
Chrysler Building New York City USA 319 1047 77 1930
New York Times Building New York City USA 319 1046 52 2007
HHHR Tower Dubai UAE 317 1042 72 2010
Bank of America Plaza Atlanta USA 317 1040 55 1992
Moi Center Shenyang China 311 1020 75 2012
U.S. Bank Tower Los Angeles USA 310 1018 73 1989
Menara Telekom Kuala Lumpur Malaysia 310 1017 55 2001
Ocean Heights Dubai UAE 310 1017 82 2010
Sky Tower Abu Dhabi UAE 310 1017 74 2010
Pearl River Tower Guangzhou China 310 1016 71 2012
Jumeirah Emirates Towers Hotel Dubai UAE 309 1014 56 2000
Eurasia Moscow Russia 309 1013 72 2013
Burj Rafal Riyadh Saudi Arabia 308 1010 68 2014
Franklin Center Chicago USA 307 1007 60 1989
Cayan Tower Dubai UAE 306 1005 76 2013
One57 New York City USA 306 1004 75 2013
East Pacific Center Tower A Shenzhen China 306 1004 85 2012
The Shard London UK 306 1004 72 2012
The Address Downtown Burj Khalifa Dubai UAE 306 1004 63 2008
JPMorgan Chase Tower Houston USA 305 1002 75 1982
Etihad Tower 2 Abu Dhabi UAE 305 1002 79 2011
Northeast Asia Trade Tower Incheon South Korea 305 1001 68 2010
Baiyoke Tower II Bangkok Thailand 304 997 85 1997
Two Prudential Plaza Chicago USA 303 995 64 1990
Moi City Wuxi China 303 994 72 2012
Leatop Plaza Guangzhou China 303 993 65 2011
Wells Fargo Plaza Houston USA 302 992 71 1983
Kingdom Centre Riyadh Saudi Arabia 302 992 41 2002
Gate of the Orient Suzhou China 302 990 68 2012
Moscow Tower Moscow Russia 302 989 76 2010
We've the Zenith Tower A Busan South Korea 301 987 80 2011
Aspire Tower Doha Qatar 300 984 36 2007
Arraya 2 Kuwait City Kuwait 300 984 60 2009
Gran Torre Santiago Santiago Chile 300 984 64 2012
One Island East Hong Kong Hong Kong 298 979 67 2008
Shanghai Wheelock Square Shanghai China 298 978 58 2009
First Canadian Place Toronto Canada 298 978 72 1976
4 World Trade Center New York USA 298 977 72 2012
Eureka Tower Melbourne Australia 297 975 91 2006
Comcast Center Philadelphia USA 297 975 57 2008
Yokohama Landmark Tower Yokohama Japan 296 972 73 1993
Emirates Crown Dubai UAE 296 971 63 2008
Islamic Bank Office Tower Dubai UAE 294 964 49 2011
Khalid Al Attar Tower 2 Dubai UAE 294 964 61 2010
311 South Wacker Drive Chicago USA 293 961 65 1990
Trump Ocean Club International Hotel and Tower Panama City Panama 293 961 68 2011
Haeundae I Park Marina Tower 2 Busan South Korea 292 959 72 2012
American International Building New York City USA 290 952 66 1932
Busan International Finance Center Busan South Korea 289 948 63 2014
Dongguan TBA Tower Dongguan China 289 948 68 2010
Key Tower Cleveland USA 289 947 57 1991
One Liberty Place Philadelphia USA 288 945 61 1987
Plaza 66 Tower One Shanghai China 288 945 66 2001
Chongqing Poly Tower Chongqing China 287 941 58 2010
SPG Global Tower 1 Suzhou China 286 938 54 2010
SPG Global Tower 2 Suzhou China 286 938 54 2010
Columbia Center Seattle USA 285 937 76 1985
Yingli Tower Chongqing China 285 936 65 2012
Millennium Tower Dubai UAE 285 935 60 2006
Sulafa Tower Dubai UAE 285 935 75 2010
Tomorrow Square Shanghai China 285 934 55 2003
D1 Dubai UAE 284 932 80 2012
Chongqing World Trade Center Chongqing China 283 929 60 2005
Cheung Kong Centre Hong Kong Hong Kong 283 928 62 1999
The Trump Building New York City USA 283 927 70 1930
We've the Zenith Tower B Busan South Korea 282 924 75 2011
Vitri Tower Panama City Panama 281 922 75 2012
Bank of America Plaza Dallas USA 281 921 72 1985
OUB Centre Singapore Singapore 280 919 66 1986
UOB Plaza One Singapore Singapore 280 919 66 1992
Republic Plaza Singapore Singapore 280 919 66 1996
Marina Pinnacle Dubai UAE 280 919 73 2010
Seoul International Financial Center Seoul South Korea 279 916 55 2012
Citigroup Center New York City USA 279 915 59 1977
Greenland Plaza Zhengzhou China 279 915 56 2012
Hong Kong New World Tower Shanghai China 278 913 61 2002
Trust Tower Abu Dhabi UAE 278 912 60 2010
Etihad Tower 1 Abu Dhabi UAE 278 911 70 2011
Trump International Hotel and Tower Toronto Canada 277 908 57 2012
Diwang International Commerce Center Nanning China 276 906 54 2006
Scotia Plaza Toronto Canada 275 902 68 1988
Williams Tower Houston USA 275 901 64 1983
Nantong Zhongnan International Plaza Nantong China 273 897 53 2011
Wuhan World Trade Tower Wuhan China 273 896 58 1998
Lvjing Tower Shenzhen China 273 896 56 2011
Shimao International Center Fuzhou China 273 896 56 2012
Haeundae I Park Marina Tower 1 Busan South Korea 273 895 66 2011
United International Chongqing China 271 889 68 2012
Renaissance Tower Dallas USA 270 886 56 1974
The Cullinan South Tower Hong Kong Hong Kong 270 886 68 2008
The Cullinan North Tower Hong Kong Hong Kong 270 886 68 2008
China International Center Tower B Guangzhou China 270 886 62 2007
Dapeng International Plaza Guangzhou China 269 884 56 2006
One Lujiazui Shanghai China 269 883 47 2008
JAL Hotel Dubai UAE 269 883 60 2008
21st Century Tower Dubai UAE 269 883 55 2003
Bitexco Financial Tower Ho Chi Minh City Vietnam 269 882 68 2010
Naberezhnaya Tower C Moscow Russia 268 881 61 2007
Bank of Guangzhou Tower Guangzhou China 268 878 57 2012
Al Faisaliyah Center Riyadh Saudi Arabia 267 876 44 2000
8 Spruce Street New York City USA 267 876 76 2010
Star Bay Tower Panama City Panama 267 876 65 2012
Fortune Center Phase 3 Beijing China 266 874 56 2012
The Point Panama City Panama 266 873 65 2011
The River Bangkok Thailand 265 871 73 2012
Bank of America Corporate Center Charlotte USA 265 871 60 1992
900 North Michigan Chicago USA 265 869 66 1989
Al Kazim Tower 1 Dubai UAE 265 869 53 2008
Al Kazim Tower 2 Dubai UAE 265 869 53 2008
Bocom Financial Towers Shanghai China 265 869 52 2002
120 Collins Street Melbourne Australia 265 869 52 1991
We've the Zenith Tower C Busan South Korea 265 869 70 2011
WBC The Palace Towers Tower 1 Busan South Korea 265 869 71 2010
WBC The Palace Towers Tower 2 Busan South Korea 265 869 71 2010
SunTrust Plaza Atlanta USA 264 867 60 1992
Triumph-Palace Moscow Russia 264 866 54 2005
Arts Tower Panama City Panama 264 866 80 2012
Samsung Tower Palace 3, Tower G Seoul South Korea 264 865 73 2004
Trump World Tower New York City USA 262 859 72 2001
Water Tower Place Chicago USA 262 859 74 1976
Grand Gateway Shanghai I Shanghai China 262 859 52 2005
Grand Gateway Shanghai II Shanghai China 262 859 52 2005
Aqua Chicago USA 262 859 86 2009
Aon Center Los Angeles USA 262 858 62 1973
East Pacific Center Tower B Shenzhen China 261 856 72 2012
Sapphire of Istanbul Istanbul Turkey 261 856 54 2010
Grand Lisboa Macau China 261 856 47 2008
TD Canada Trust Tower Toronto Canada 261 856 53 1990
The Masterpiece Hong Kong Hong Kong 261 856 64 2007
Islamic Bank Residential Tower Dubai UAE 261 856 51 2011
Etihad Tower 3 Abu Dhabi UAE 260 854 62 2011
Vision Tower Dubai UAE 260 853 60 2010
Shanghai IFC North Tower Shanghai China 260 853 60 2011
Jing'an Kerry Center Phase 2 Shanghai China 260 853 58 2012
Sunny World Center Shenyang China 260 853 59 2012
Bahrain Financial Harbour 1 Manama Bahrain 260 853 53 2007
Bahrain Financial Harbour 2 Manama Bahrain 260 853 53 2007
101 Collins Street Melbourne Australia 260 853 50 1991
Abraj Al Bait Hajar Tower Mecca Saudi Arabia 260 853 48 2012
Abraj Al Bait ZamZam Tower Mecca Saudi Arabia 260 853 48 2012
Shenzhen Special Zone Press Tower Shenzhen China 260 853 48 1998
Transamerica Pyramid San Francisco USA 260 853 48 1972
Chase Tower Chicago USA 259 850 60 1969
GE Building New York City USA 259 850 69 1933
Commerzbank Tower Frankfurt Germany 259 850 56 1997
PBCOM Tower Makati Philippines 259 850 55 2000
Two Liberty Place Philadelphia USA 258 848 58 1990
Huamin Imperial Tower Shanghai China 258 847 63 2011
Lanko�Grand Hyatt Hotel Chongqing China 258 846 60 2004
Tianjin Hutchinson Whampoa Metro Plaza Tianjin China 258 846 53 2012
Park Tower Chicago USA 257 844 67 2000
Devon Tower Oklahoma City USA 257 844 50 2012
Ciputra World Hotel Tower Jakarta Indonesia 257 844 49 2013
St. Petersburg Tower Moscow Russia 257 843 65 2010
Messeturm Frankfurt Germany 257 842 55 1990
U.S. Steel Tower Pittsburgh USA 256 841 64 1970
Sorrento 1 Hong Kong Hong Kong 256 841 75 2003
The Harbour Hotel & Residence Dubai UAE 256 840 59 2007
Ubora Tower 1 Dubai UAE 256 840 59 2007
Hyperion Tower A Seoul South Korea 256 840 69 2003
Rinku Gate Tower Building Izumisano Japan 256 840 56 1996
New Century Plaza Tower A Nanjing China 255 837 52 2006
Langham Place Office Tower Hong Kong Hong Kong 255 837 59 2004
Tower Financial Center Panama City Panama 255 837 53 2011
Conrad Hotel Dubai UAE 255 837 51 2012
The Imperial I Mumbai India 254 833 60 2009
The Imperial II Mumbai India 254 833 60 2009
Capital Tower Singapore Singapore 253 830 52 2000
Chase Tower Indianapolis USA 253 830 48 1990
Highcliff Hong Kong Hong Kong 252 828 72 2003
Bank of Shanghai Headquarters Shanghai China 252 827 46 2005
Osaka World Trade Center Building Osaka Japan 252 827 55 1995
The Harbourside Hong Kong Hong Kong 251 824 73 2003
Rialto Towers Melbourne Australia 251 824 63 1986
Jiali Plaza Wuhan China 251 823 61 1997
The Gramercy Residences Makati Philippines 250 820 73 2012
Discovery Primea Makati Philippines 250 820 68 2013
The Gate Tower 1 Abu Dhabi UAE 250 820 65 2012
The Gate Tower 2 Abu Dhabi UAE 250 820 65 2012
The Gate Tower 3 Abu Dhabi UAE 250 820 65 2012
Angsana Hotel Tower 1 Dubai UAE 250 820 49 2008
Angsana Hotel Tower 2 Dubai UAE 250 820 49 2008
Beijing Yintai Centre Tower 2 Beijing China 250 820 63 2007
Chelsea Tower Dubai UAE 250 820 49 2005
One Atlantic Center Atlanta USA 250 820 50 1987
Caja Madrid Tower Madrid Spain 250 820 45 2008
Wisma 46 Jakarta Indonesia 250 820 48 1996
Post & Telecommunication Hub Guangzhou China 250 820 66 2003
Ahmed Khoory Tower Dubai UAE 250 820 60 2012
The Legacy at Millennium Park Chicago USA 250 819 73 2010
International Hainan Airlines Plaza Haikou China 250 819 54 2012
Infinity Brisbane Australia 249 817 81 2013
Cathay Pacific Plaza 1 Ordos China 249 817 55 2012
Cathay Pacific Plaza 2 Ordos China 249 817 55 2012
Al Tayer Tower Dubai UAE 249 817 49 2009
63 Building Seoul South Korea 249 817 60 1985
Metapolis 101 Hwaseong City South Korea 249 817 66 2010
Central Park Perth Australia 249 817 52 1992
Torre de Cristal Madrid Spain 249 817 45 2008
Midtown Tower Tokyo Japan 248 814 54 2007
CitySpire Center New York City USA 248 814 75 1987
One Chase Manhattan Plaza New York City USA 248 813 60 1960
Midland Square Nagoya Japan 247 810 47 2007
Metapolis 104 Hwaseong City South Korea 247 810 66 2010
State Tower Bangkok Thailand 247 810 68 2001
Conde Nast Building New York City USA 247 809 48 1999
Kai Yuen World Center Shijiazhuang China 246 808 53 2012
MetLife Building New York City USA 246 808 59 1963
Stock Exchange Plaza Shenzhen China 246 807 51 2012
Bloomberg Tower New York City USA 246 806 54 2005
Qingdao International Trade Center 1 Qingdao China 246 806 50 2012
Qingdao International Trade Center 2 Qingdao China 246 806 50 2012
Federation of Korean Industries Head Office Seoul South Korea 245 805 50 2013
AVIC Plaza Shenzhen China 245 804 52 2012
JR Central Towers Nagoya Japan 245 804 51 2007
Oasis Beach Tower Dubai UAE 245 804 51 2006
Al Fattan Tower Dubai UAE 245 804 51 2006
Churchill Residency Dubai UAE 245 804 59 2010
One Raffles Quay Singapore Singapore 245 804 59 2006
The Sail @ Marina Bay Singapore Singapore 245 804 59 2000
Moshe Aviv Tower Tel Aviv Israel 244 801 69 2003
Varyap Meridian Grand Tower 1 ?stanbul Turkey 244 801 61 2012
AAM Tower Dubai UAE 244 801 46 2008
BHP Billiton Tower Perth Australia 244 800 46 2012
Maybank Tower Kuala Lumpur Malaysia 243 799 50 1987
Soul Gold Coast Australia 243 797 77 2011
Soleil Brisbane Australia 243 797 74 2011
The Tower Dubai UAE 243 797 54 2002
R&F Centre Guangzhou China 243 797 54 2007
Dalian Futures Square 1 Dalian China 243 797 53 2010
Tokyo Metropolitan Government Building Tokyo Japan 243 797 48 1991
Citigroup Centre Sydney Australia 243 797 50 2000
F&F Tower Panama City Panama 243 797 52 2011
Dalian World Trade Centre Dalian China 242 796 61 2000
Federation West Tower Moscow Russia 242 795 62 2007
Pearl Tower Panama City Panama 242 795 70 2011
Torre Waters Panama City Panama 242 794 75 2011
IDS Tower Minneapolis USA 241 792 57 1973
Mellon Bank Center Philadelphia USA 241 792 54 1990
Woolworth Building New York City USA 241 792 57 1913
World Trade Center Doha Doha Qatar 241 791 51 2012
Maxdo Centre Shanghai China 241 791 55 2002
Bank of China Mansion Qingdao China 241 791 54 1999
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment