Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP

Loading…

get correct row counts into SHOW TABLE STATUS #11

Closed
jonahcohen opened this Issue · 1 comment

2 participants

@jonahcohen
Collaborator

From @mdcallag:

We can get an estimate for the row count via ('Rows:' below is always 10,000 today) via RocksDB property "rocksdb.estimate-num-keys".

Data_length and index_length are best defined when not using an index-organized table. For an index-organized table like InnoDB, the data_length column includes the size of the PK index (including all columns) and the index_length column has the size of all secondary indexes. We can treat RocksDB in the same way. However, we aren't using file-per-table or file-per-index for RocksDB so we need to determine whether we can get estimates on index sizes.

mysql -e 'show table status\G' iok1

*************************** 1. row ***************************
Name: ai
Engine: ROCKSDB
Version: 10
Row_format: Dynamic
Rows: 1000
Avg_row_length: 0
Data_length: 0
Max_data_length: 0
Index_length: 0
Data_free: 0
Auto_increment: NULL
Create_time: NULL
Update_time: NULL
Check_time: NULL
Collation: latin1_swedish_ci
Checksum: NULL
Create_options:
Comment:

@maykov maykov was assigned by jonahcohen
@maykov maykov referenced this issue from a commit
@maykov maykov Returning an aproximate size of data and index
Summary:
This diff introduces the usage of GetAproximateSizes function to measure the aproximate size of the primary index and the aproximate size of secondary indexes per table.
#11

Test Plan: see the enclosed test

Reviewers: yoshinorim

Subscribers: hermanlee4, jonahcohen, spetrunia

Differential Revision: https://reviews.facebook.net/D33189
32224d6
@maykov maykov closed this
@spetrunia spetrunia referenced this issue from a commit
@spetrunia spetrunia #11: Column families for RocksDB-SE
- Basic support for Column Families (writes/reads go the right column
  family).
- CFs are specified per-index in the index comment:
  INDEX (col1,col2) COMMENT 'cf_name'
aec897f
@maykov maykov referenced this issue from a commit
@maykov maykov Returning an aproximate size of data and index
Summary:
This diff introduces the usage of GetAproximateSizes function to measure the aproximate size of the primary index and the aproximate size of secondary indexes per table.
#11

Test Plan: see the enclosed test

Reviewers: yoshinorim

Subscribers: hermanlee4, jonahcohen, spetrunia

Differential Revision: https://reviews.facebook.net/D33189
8678c0b
@maykov maykov referenced this issue from a commit in facebook/mysql-5.6
@maykov maykov Returning an aproximate size of data and index
Summary:
This diff introduces the usage of GetAproximateSizes function to measure the aproximate size of the primary index and the aproximate size of secondary indexes per table.
MySQLOnRocksDB#11

Test Plan: see the enclosed test

Reviewers: yoshinorim

Subscribers: hermanlee4, jonahcohen, spetrunia

Differential Revision: https://reviews.facebook.net/D33189
f9191b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.