This file contains hidden or 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
create unique index person_pk on person(person_id); | |
create index person_n1 on person(date_id); | |
create unique index calendar_pk on calendar(date_id) ; | |
This file contains hidden or 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
-------------- | |
alter table call_center add constraint cc_d1 foreign key (cc_closed_date_sk) references date_dim (d_date_sk) | |
-------------- | |
Query OK, 6 rows affected (0.03 sec) | |
Records: 6 Duplicates: 0 Warnings: 0 | |
-------------- | |
alter table call_center add constraint cc_d2 foreign key (cc_open_date_sk) references date_dim (d_date_sk) | |
-------------- |
This file contains hidden or 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
Three comparison points: | |
Presto + RCFile vs Impala + RCFile vs Impala + Parquet | |
Note: Query time, CPU utilization, Disk read tput (KBRead) | |
Impala v1.1.1 | |
Presto v0.52 | |
================================================================================================================================ | |
Presto + RCFile: | |
select ss_sold_date_sk, count(*) from store_sales_rcfile group by 1 order by 1 limit 2000; |
This file contains hidden or 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
/* Instructions on compilation and execution | |
* ========================================= | |
* | |
* Compile this program with pthreads: | |
* | |
* g++ -Wall -lpthread -o graphdb-simulator graphdb-simulator.cpp | |
* | |
* Before you run this program, you need to create the following | |
* directories: | |
* |
This file contains hidden or 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
#!/usr/bin/env python | |
# encoding: utf-8 | |
import sys | |
import urllib | |
import codecs | |
import json | |
import unicodecsv | |
import dateutil.parser as parser |
We can make this file beautiful and searchable if this error is corrected: It looks like row 2 should actually have 11 columns, instead of 12 in line 1.
This file contains hidden or 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
Entity Name Title Base Overtime Other (vacation, sick, bonus, etc) Medical/Dental/Visual Employeer Contribution to Pension Employee Contribution to Pension Paid By Employer Employer Contribution to Deferred Compensation (401k) Misc Total Cost of Employment | |
Bay Area Rapid Transit Dugger, Dorothy General Mgr 298700 0 34500 14951 39521 23324 1869 6796 419661 | |
Bay Area Rapid Transit Crunican, Grace General Mgr 312461 0 3846 19141 37513 17500 1869 7591 399921 | |
Bay Area Rapid Transit Tietz, Forrest Police Sergeant 136746 111902 33921 18200 60630 156 0 1107 362662 | |
Bay Area Rapid Transit Pangilinan, Edgardo Asst Controller 107785 0 214322 10903 13017 7650 1869 5734 361279 | |
Bay Area Rapid Transit Lucarelli, Frank Police Lieutenant 173811 46280 33422 23364 76427 233 0 5019 358556 | |
Bay Area Rapid Transit Collier, Roberta Asst Treasurer 33971 0 289534 1797 4072 2378 1869 4897 338518 | |
Bay Area Rapid Transit Parker, Thomas Exec Mgr Transit System Compl 136544 0 145633 19139 16863 9923 1869 5584 335554 | |
Bay Area Rapid Transit Ra |
This file contains hidden or 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
[impala1:21000] > | |
select * | |
from (values ('2013-06-01' as col1), | |
('2013-06-02'), | |
('2013-06-02'), | |
('2013-06-03'), | |
('2013-06-04'), | |
('2013-06-05') | |
) x; |
This file contains hidden or 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
drop table t2; | |
create table t2 | |
( | |
day_id int not null, | |
time_id date not null, | |
begin_time date not null, | |
end_time date not null | |
); | |
begin |
This file contains hidden or 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
$ sudo ethtool eth0 | |
Settings for eth0: | |
Supported ports: [ TP ] | |
Supported link modes: 10baseT/Half 10baseT/Full | |
100baseT/Half 100baseT/Full | |
1000baseT/Full | |
Supports auto-negotiation: Yes | |
Advertised link modes: 10baseT/Half 10baseT/Full | |
100baseT/Half 100baseT/Full | |
1000baseT/Full |
This file contains hidden or 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
# | |
# Example for building demo OCI programs: | |
# | |
# 1. All OCI demos (including extdemo2, extdemo4 and extdemo5): | |
# | |
# make -f demo_rdbms.mk demos | |
# | |
# 2. A single OCI demo: | |
# | |
# make -f demo_rdbms.mk build EXE=demo OBJS="demo.o ..." |