ClickHouse/docs/en
Azat Khuzhin 064f901ea8 Add ability to preallocate hashtables for hashed/sparsehashed dictionaries
preallocation can be used only when we know number of rows, and for this
we need:
- source clickhouse
- no filtering (i.e. lack of <where>), since filtering can filter
  too much rows and eventually it may allocate memory that will
  never be used.

For sparse_hash the difference is quite significant, preallocated
sparse_hash hashtable allocates ~33% faster (7.5 seconds vs 5 seconds
for insert, and the difference is more significant for higher number of
elements):

    $ ninja bench-sparse_hash-run
    [1/1] cd /src/ch/hashtable-bench/.cmake && ...ch/hashtable-bench/.cmake/bench-sparse_hash
    sparse_hash/insert: 7.574 <!--
    sparse_hash/find  : 2.14426
    sparse_hash/maxrss: 174MiB
    sparse_hash/time:   9710.51 msec (user+sys)

    $ time ninja bench-sparse_hash-preallocate-run
    [1/1] cd /src/ch/hashtable-bench/.cmake && ...-bench/.cmake/bench-sparse_hash-preallocate
    sparse_hash/insert: 5.0522 <!--
    sparse_hash/find  : 2.14024
    sparse_hash/maxrss: 174MiB
    sparse_hash/time:   7192.06 msec (user+sys)

P.S. the difference for sparse_hashed dictionary with 4e9 elements
(uint64, uint16) is ~18% (4975.905 vs 4103.569 sec)

v2: do not reallocate the dictionary from the progress callback
    Since this will access hashtable in parallel.
v3: drop PREALLOCATE() and do this only for source=clickhouse and empty
    <where>
2020-10-09 22:28:14 +03:00
..
commercial [docs] split various kinds of CREATE queries into separate articles (#12328) 2020-07-09 18:10:35 +03:00
development Convert to python3 (#15007) 2020-10-02 19:54:07 +03:00
engines Revert "Revert "Test and doc for PR12771 krb5 + cyrus-sasl + kerberized kafka"" 2020-09-29 11:56:37 +03:00
faq Update json-import.md 2020-08-25 11:39:38 +08:00
getting-started DOCSUP-2038 Edit and translate to Russian (#14236) 2020-09-16 21:54:55 +03:00
guides [docs] split aggregate function and system table references (#11742) 2020-06-18 11:24:31 +03:00
images [ImgBot] Optimize images 2020-05-11 03:31:47 +00:00
interfaces add tcp client for php 2020-10-08 15:30:14 +08:00
introduction Change phone number 2020-09-25 16:12:52 +03:00
operations Merge pull request #15522 from r1j1k/53r93y-DOCSUP-2866-allow_experimental_bigint_types 2020-10-08 16:06:42 +03:00
sql-reference Add ability to preallocate hashtables for hashed/sparsehashed dictionaries 2020-10-09 22:28:14 +03:00
whats-new [docs] split various kinds of CREATE queries into separate articles (#12328) 2020-07-09 18:10:35 +03:00
index.md [docs] replace underscores with hyphens (#10606) 2020-04-30 21:19:18 +03:00