Re: [pgAdmin4][Patch]: To handle long numbers for Rows (estimated) field in Table's properties

From: Murtuza Zabuawala <murtuza(dot)zabuawala(at)enterprisedb(dot)com>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Harshal Dhumal <harshal(dot)dhumal(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: [pgAdmin4][Patch]: To handle long numbers for Rows (estimated) field in Table's properties
Date: 2017-11-01 16:28:20
Message-ID: CAKKotZT31bxDujYHpYm3Hst25iPpU4mjv-TExGRkwG7wQV4d7g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hi Dave,

Please find updated patch with suggested changes.

On Wed, Nov 1, 2017 at 8:42 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:

>
>
> On Wed, Nov 1, 2017 at 2:40 PM, Murtuza Zabuawala <murtuza.zabuawala@
> enterprisedb.com> wrote:
>
>> In my opinion, displaying 2000+ instead of actual value doesn't looks
>> good.
>>
>> Let say my threshold is set to 5000 and I have 1million rows, displaying
>> 5000+ instead of actual value doesn't looks good.
>> OR
>> What we can do is, we can hide the field if it is empty/or less than
>> threshold.
>>
>
> I don't think it would necessarily look bad - after all, the estimated row
> count will be displayed right above it.
>
>
>>
>> Thoughts?
>>
>>
>> On Wed, Nov 1, 2017 at 7:55 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>
>>>
>>>
>>> On Wed, Nov 1, 2017 at 2:25 PM, Harshal Dhumal <
>>> harshal(dot)dhumal(at)enterprisedb(dot)com> wrote:
>>>
>>>> Hi Murtuza,
>>>>
>>>> I think for tables having row count more than preference count it
>>>> should show preference count with plus '+' sign instead empty.
>>>> eg. 2000+ (for table with rows more than 2000 and for preference count
>>>> of 2000.)
>>>>
>>>
>>> That's a nice idea.
>>>
>>>
>>>>
>>>>
>>>> [image: Inline image 1]
>>>>
>>>>
>>>>
>>>> --
>>>> *Harshal Dhumal*
>>>> *Sr. Software Engineer*
>>>>
>>>> EnterpriseDB India: http://www.enterprisedb.com
>>>> The Enterprise PostgreSQL Company
>>>>
>>>> On Wed, Nov 1, 2017 at 7:38 PM, Murtuza Zabuawala <
>>>> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>>>>
>>>>> Hi Dave,
>>>>>
>>>>> Please find updated patch.
>>>>>
>>>>> ​-- Murtuza​
>>>>>
>>>>>
>>>>> On Wed, Nov 1, 2017 at 6:50 PM, Murtuza Zabuawala <
>>>>> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>>>>>
>>>>>> Thanks Dave, I'll check the implementation in pgAdmin3 & send new
>>>>>> patch with suggested changes.
>>>>>>
>>>>>>
>>>>>> On Wed, Nov 1, 2017 at 6:41 PM, Dave Page <dpage(at)pgadmin(dot)org> wrote:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> On Wed, Nov 1, 2017 at 11:58 AM, Murtuza Zabuawala <
>>>>>>> murtuza(dot)zabuawala(at)enterprisedb(dot)com> wrote:
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> PFA patch to fix the issue where "Rows (estimated)" field was not
>>>>>>>> displaying long number properly.
>>>>>>>> RM#2386
>>>>>>>>
>>>>>>>> I have also added the code to count actual rows in a table [ "Rows
>>>>>>>> (counted)" filed ] which was missing.
>>>>>>>>
>>>>>>>
>>>>>>> Oops. Well the idea is good, but unfortunately we want to be careful
>>>>>>> about when we count the rows, as we could have just clicked on a 10B row
>>>>>>> table which would take a while. To avoid that, pgAdmin III would only count
>>>>>>> the rows in the table if the estimated number of rows was below a specific
>>>>>>> value (see File -> Preferences -> Browser -> Properties -> "Count rows if
>>>>>>> estimated less than").
>>>>>>>
>>>>>>> I think we need to do the same here - add a preferences option, and
>>>>>>> only count if estimated is greater than the specified value (the default
>>>>>>> for which was 2000 in pgAdmin III I believe).
>>>>>>>
>>>>>>> --
>>>>>>> Dave Page
>>>>>>> Blog: http://pgsnake.blogspot.com
>>>>>>> Twitter: @pgsnake
>>>>>>>
>>>>>>> EnterpriseDB UK: http://www.enterprisedb.com
>>>>>>> The Enterprise PostgreSQL Company
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>> --
>>> Dave Page
>>> Blog: http://pgsnake.blogspot.com
>>> Twitter: @pgsnake
>>>
>>> EnterpriseDB UK: http://www.enterprisedb.com
>>> The Enterprise PostgreSQL Company
>>>
>>
>>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>

Attachment Content-Type Size
RM_2836_v2.diff text/plain 8.8 KB
image/png 21.7 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Alexander Lakhin 2017-11-01 17:08:22 Re: pgAdmin 4: Russian translation
Previous Message Dave Page 2017-11-01 15:19:52 Re: Fixes for pgAdmin4 messages