ClickHouse® is a real-time analytics DBMS
Go to file
Azat Khuzhin b0a80af888 Reduce lock contention for multiple layers of the Buffer engine
Otherwise you can see something like this for the following query:

    ```sql
    WITH
        arrayMap(x -> demangle(addressToSymbol(x)), s.trace) AS trace_array,
        arrayStringConcat(trace_array, '\n') AS trace_string
    SELECT
        p.thread_id,
        p.query_id,
        p.query,
        trace_string
    FROM
    (
        SELECT
            query_id,
            query,
            arrayJoin(thread_ids) AS thread_id
        FROM system.processes
    ) AS p
    INNER JOIN system.stack_trace AS s ON p.thread_id = s.thread_id
    ORDER BY p.query_id ASC
    SETTINGS enable_global_with_statement = 0, allow_introspection_functions = 1
    FORMAT PrettyCompactNoEscapes
    ```

Lots of the following:

    ```sql
    INSERT INTO buffer (...) VALUES

    __lll_lock_wait
    pthread_mutex_lock
    std::__1::mutex::lock()
    DB::StorageBuffer::reschedule()
    DB::BufferBlockOutputStream::write(DB::Block const&)
    ```

That will wait one of this:

    ```
    INSERT INTO buffer (...) VALUES

    ...
    DB::PushingToViewsBlockOutputStream::write(DB::Block const&)
    DB::AddingDefaultBlockOutputStream::write(DB::Block const&)
    DB::SquashingBlockOutputStream::finalize()
    DB::SquashingBlockOutputStream::writeSuffix()
    DB::PushingToViewsBlockOutputStream::writeSuffix()
    DB::StorageBuffer::writeBlockToDestination(DB::Block const&, std::__1::shared_ptr<DB::IStorage>)
    DB::StorageBuffer::flushBuffer(DB::StorageBuffer::Buffer&, bool, bool, bool)
    ```

P.S. we cannot simply unlock the buffer during flushing, see comments in
the code
2021-01-21 22:09:24 +03:00
.github add Sanitizer report issue template 2021-01-20 17:31:56 +03:00
base fix 2021-01-20 14:12:33 +03:00
benchmark Convert to python3 (#15007) 2020-10-02 19:54:07 +03:00
cmake Revert "Revert "Auto version update to [21.2.1.1] [54446]"" 2021-01-21 12:39:46 +03:00
contrib Merge branch 'master' into update_cassandra 2021-01-19 14:10:15 +03:00
debian Revert "Revert "Auto version update to [21.2.1.1] [54446]"" 2021-01-21 12:39:46 +03:00
docker Revert "Revert "Auto version update to [21.2.1.1] [54446]"" 2021-01-21 12:39:46 +03:00
docs Merge pull request #19023 from sevirov/sevirov-DOCSUP-4966-add_multiword_data_types 2021-01-21 16:07:25 +03:00
programs Merge remote-tracking branch 'origin/master' into HEAD 2021-01-19 20:34:01 +03:00
src Reduce lock contention for multiple layers of the Buffer engine 2021-01-21 22:09:24 +03:00
tests Merge pull request #18788 from hexiaoting/map_functions 2021-01-21 21:02:03 +03:00
utils Prepare changelog 2021-01-18 20:58:31 +03:00
website Add results from Yiğit Konur and Metehan Çetinkaya of seo.do 2021-01-13 20:17:49 +03:00
.arcignore Added .arcignore 2020-05-21 09:17:03 +03:00
.clang-format Fixed wrong code around Memory Profiler 2020-03-03 03:24:44 +03:00
.clang-tidy Enable clang-tidy for programs and utils 2020-05-18 04:19:50 +03:00
.editorconfig Changed tabs to spaces in editor configs and in style guide [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
.gitattributes Decreased warning threshold [#MOBMET-3248] 2016-06-07 11:23:15 +03:00
.gitignore ANTLR4 Grammar for ClickHouse and new parser (#11298) 2020-12-04 05:15:44 +03:00
.gitmodules Update libpq, tiny fix 2021-01-10 15:38:46 +00:00
.potato.yml Update comments in .potato.yml 2019-10-20 12:50:33 +08:00
.vimrc Changed tabs to spaces in editor configs and in style guide [#CLICKHOUSE-3]. 2017-04-01 11:35:09 +03:00
AUTHORS Update AUTHORS 2020-01-23 17:36:05 +03:00
CHANGELOG.md Update CHANGELOG.md 2021-01-19 21:59:01 +03:00
CMakeLists.txt Merge branch 'master' into kssenii-pg2ch 2021-01-15 17:33:19 +03:00
CODE_OF_CONDUCT.md Add minimal code of conduct #9676 2020-03-16 12:44:28 +03:00
CONTRIBUTING.md Update CONTRIBUTING.md 2020-01-27 21:03:30 +03:00
docker-compose.yml Updated docker-compose.yml #1025 2017-07-26 20:05:32 +03:00
format_sources allow several <graphite> targets (#603) 2017-03-21 23:08:09 +04:00
LICENSE Update LICENSE 2020-01-23 17:38:30 +03:00
PreLoad.cmake Check if XCODE_IDE is true and avoid enforcing ninja in that case 2021-01-06 03:06:03 +04:00
README.md Update README.md 2021-01-18 13:59:56 +03:00
release Convert to python3 (#15007) 2020-10-02 19:54:07 +03:00
SECURITY.md Update SECURITY.md (outdated long time ago) 2021-01-21 16:48:28 +03:00
uncrustify.cfg Better .clang-format and uncrustify.cfg 2018-11-29 15:45:34 +03:00
ya.make Changes required for auto-sync with Arcadia 2020-04-16 15:31:57 +03:00

ClickHouse — open source distributed column-oriented DBMS

ClickHouse® is an open-source column-oriented database management system that allows generating analytical data reports in real time.

  • Official website has quick high-level overview of ClickHouse on main page.
  • Tutorial shows how to set up and query small ClickHouse cluster.
  • Documentation provides more in-depth information.
  • YouTube channel has a lot of content about ClickHouse in video format.
  • Slack and Telegram allow to chat with ClickHouse users in real-time.
  • Blog contains various ClickHouse-related articles, as well as announcements and reports about events.
  • Code Browser with syntax highlight and navigation.
  • Yandex.Messenger channel shares announcements and useful links in Russian.
  • Contacts can help to get your questions answered if there are any.
  • You can also fill this form to meet Yandex ClickHouse team in person.

Upcoming Events