Bug #31901 read_rnd_buffer_size doesn't seem to be used as written in Reference Manual
| Submitted: | 29 Oct 2007 2:51 | Modified: | 13 Feb 2008 9:48 |
|---|---|---|---|
| Reporter: | Yasufumi Kinoshita | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S5 (Performance) |
| Version: | 5.0.45 | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[29 Oct 2007 2:51]
Yasufumi Kinoshita
[2 Nov 2007 7:15]
Yasufumi Kinoshita
Sorry, It's my mistake.. The main route is as following. JOIN:exec() create_sort_index() filesort() /* Step 1. ~ 8.*/ tab->read_first_record = join_init_read_record do_select() sub_select() (*join_tab->read_first_record)() init_read_record() /* init read_rnd_buffer */ -------------------------- But, I still wonder the sorting behavior. If we have enough sort_buffer_size to sort data without merging, the read_rnd_buffer is never used. So, in some cases, the performance without merging is worse than with merging. Regards
[11 Dec 2007 11:00]
Susanne Ebrecht
Please, can you tell us, where do you find this in our source code? Looking through the code from MySQL Server 5.0.45, the code is nowhere.
[12 Jan 2008 0:00]
Bugs System
No feedback was provided for this bug for over a month, so it is being suspended automatically. If you are able to provide the information that was originally requested, please do so and change the status of the bug back to "Open".
[31 Jan 2008 12:23]
Susanne Ebrecht
Yasufumi Kinoshita, we still need to know, from which file/version of our source is the pasted code?
[13 Feb 2008 1:25]
Yasufumi Kinoshita
Sorry for my late reply.
====(sql/records.cc: init_read_record())================
...
if (select && my_b_inited(&select->file))
tempfile= &select->file;
else
tempfile= table->sort.io_cache;
if (tempfile && my_b_inited(tempfile)) // Test if ref-records was used
{
...
if (! init_rr_cache(thd, info))
...
========================================================
If [data need sort] < [sort_buffer_size], [tempfile= table->sort.io_cache ==0] at here.
So, it never calls init_rr_cache(), and never uses read_rnd_buffer.
Thus, if we uses read_rnd_buffer for sorting and we sets abundant sort_buffer, read_rnd_buffer comes not to be used and some sorting may become slow.
[13 Feb 2008 9:48]
Susanne Ebrecht
Many thanks for writing a bug report. The referred code starts at line 104 at sql/record.cc.
[13 Feb 2008 10:11]
Konstantin Osipov
Changing the category.
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.042 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.