Changes between Version 1 and Version 2 of Ticket #30130


Ignore:
Timestamp:
Jan 24, 2019, 2:57:16 PM (6 years ago)
Author:
James Lin
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #30130 – Description

    v1 v2  
    11I have a table virtualmachineresources, which has 100k+ rows, it has columns `machine` and `cluster`, some rows the cluster field is empty. it has repeating rows of machine + with/without cluster, hence I want to use the distinct() method.
    22
    3 using .values().distinct().count(), it return 2k rows
     3using .values().distinct().count(), it returned 2k rows
    44
    55
     
    1919
    2020
    21 I observed it return 100k rows, with repeating rows that the same 'machine` with/without the cluster.
     21I observed it returned 100k rows, with repeating rows that the same 'machine` with/without the cluster.
    2222
    2323Here is the corresponding stackoverflow question https://stackoverflow.com/questions/54354462/django-distinct-returns-more-records-than-count
Back to Top