T
T
ttywizard2019-06-29 08:35:42
MySQL
ttywizard, 2019-06-29 08:35:42

Why is MySQL (Sphinx) giving such strange results?

There is a Sphinx index with a uint - common_id field, which is supposed to be sorted by, I'm trying to make a request:
select common_id from item_ru group by common_id;

I get strange results:
+-----------+
| common_id |
+-----------+
|         1 |
|       201 |
|       401 |
|       801 |
|      1601 |
|      1201 |
|      1401 |
|      1001 |
|       601 |
|      1801 |
|      2001 |
|      2201 |
|       601 |
|      2401 |
|      2601 |
|      1401 |
|      2801 |
|      3001 |
|      2001 |
|      1401 |
+-----------+
20 rows in set (2.36 sec)

The records must be grouped and the output must be unique, but there are duplicates in the output. It is also planned to make a query with a selection of other fields:
select id, title, common_id from item_ru group by common_id order by rating desc;

Which also leads to duplicates. What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2019-06-29
@opium

What the heck do it in a sphinx, do it
in a muscle

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question