ydb-platform / ydb-platform/ydb-php-sdk

feat: Возможность получать более 1000 строк в результате запроса SELECT

Open
#152 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
39
Forks
19
Avg merge
1d 15h
Merged PRs (30d)
2

Description

Feature Request

Describe the Feature Request

На данный момент для запроса SELECT можно получить только 1000 строк в результате. В документации указано, что ограничение в 1000 строк устаревшее https://ydb.tech/docs/ru/concepts/limits-ydb

Describe Preferred Solution

Возможность получать более 1000 строк в результате запроса SELECT

Related Code

$result = $ydb->table()->retryTransaction(function(Session $session) use ($data) {
    $query = "
        DECLARE \$time AS {$this->fields['time']};
        DECLARE \$message_id AS {$this->fields['message_id']};
        SELECT * FROM {$this->table} VIEW idx_time
        WHERE (time, message_id) < (\$time, \$message_id)
        ORDER BY time DESC LIMIT 2000;
    ";

    return $session->prepare($query)->execute($data);
}, true);

$rows = $result->rows();
//dump(count($rows));

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the PHP flow shown in the issue: $session->prepare()->execute() and the resulting $result->rows(). Check how SELECT results are fetched and where the 1000-row limit is enforced, then verify the behavior with the shown LIMIT 2000 query. Done means a SELECT can return more than 1000 rows and the returned row count matches the query result.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, sql
Domain
backend, databases
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.