Re: PATCH: Choose best width for Data Output columns of Query tool

From: "J(dot)F(dot) Oster" <jinfroster(at)mail(dot)ru>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: Dinesh Kumar <dinesh(dot)kumar(at)enterprisedb(dot)com>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PATCH: Choose best width for Data Output columns of Query tool
Date: 2013-12-15 06:26:33
Message-ID: 1958864042.20131215102633@mail.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

Hello Dave,

Wednesday, December 11, 2013, 4:20:26 PM, you wrote:

DP> I took a look at this, and my only real concern is that the
DP> auto-sizing code is forcing the grid to fully populate itself, which
DP> it's currently specifically designed not to. The result of this is
DP> that if you have a large dataset, there is a delay between when the
DP> query finishes and the results are rendered.

DP> I would suggest that instead of looking at the first 50 rows, and then
DP> looking at every 500th row until the end, we just look at the first
DP> 500 and then stop. That won't be perfect of course, but it should
DP> eliminate any delay with large amounts of data.

I didn't know of that feature. I've changed the code as you suggested.
Though the delay introduced here is hardly noticeable, afaics.
Please see the fixed patch attached.

By the way, about viewing huge tables: a user would feel comfortable
if he could setup the default limit for LIMIT clause in "Edit data"
windows. Currently the user willing to see some table's data has first
to notice it's rowcount and (if it is huge) instead of pressing "View
data..." toobar button has to choose "View Data"->"View Top/Last 100
Rows" from the table's context menu. Such effort is boring and takes
time, especially when the user just wants to quickly see some sample
data to "feel" the table's essence.

I'd suggest adding a setting in Options dialogue, say "Default rows
limit", defaulting itself to "No limit" to retain current behaviour.
Please let me know if it is worth trying to implement this proposal.

--
Best regards,
J.F.

Attachment Content-Type Size
131215_sqlgrid_width_v6.patch application/octet-stream 12.0 KB

In response to

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2013-12-16 15:36:29 pgAdmin III commit: Use a much smarter auto-sizing algorithm for the co
Previous Message Dave Page 2013-12-11 14:14:46 Re: pgAdmin feature request: SQLite interface