Обсуждение: Query history

Поиск
Список
Период
Сортировка

Query history

От
Michal Kozusznik
Дата:
While trying to use query history, I found 2  issue limiting  the power 
of this feature:

A)
query history is filled by whole script, not only but queries run. It 
fills query history by the same script multiple times even if script is 
not changing.
How to reproduce:
1. Use following script
SELECT 1;
SELECT 2;

2. Select first line and execute.
3. Select second line and execute
4. Check query history - the whole script is stored on 2 slots on query 
history

There are 2 possible ways of how it should work:
1. store only executed part of script
2. make sure that the same script is not already stored (valid also for 
suggestion #1)

B)
Only one query history exists - same for all defined servers. I would 
like to see separate history for each server.
I found useless to use queries from db on another one while both 
databases may be significantly different

with regards
Michal Kozusznik


Re: Query history

От
Guillaume Lelarge
Дата:
On Wed, 2012-07-25 at 18:15 +0200, Michal Kozusznik wrote:
> While trying to use query history, I found 2  issue limiting  the power 
> of this feature:
> 

By query history, you mean the 4th tab in the query tool? or the
combobox?

> A)
> query history is filled by whole script, not only but queries run. It 
> fills query history by the same script multiple times even if script is 
> not changing.
> How to reproduce:
> 1. Use following script
> SELECT 1;
> SELECT 2;
> 
> 2. Select first line and execute.
> 3. Select second line and execute
> 4. Check query history - the whole script is stored on 2 slots on query 
> history
> 

Well, this would be a lot of work, something not reasonable to do. The
probably hardest part of it would be to find individual queries; Good
luck with that.

Right now, we send to the server everything or only the selected part.
And we know if everything went fine, or if there was an error.

> There are 2 possible ways of how it should work:
> 1. store only executed part of script
> 2. make sure that the same script is not already stored (valid also for 
> suggestion #1)
> 
> B)
> Only one query history exists - same for all defined servers. I would 
> like to see separate history for each server.
> I found useless to use queries from db on another one while both 
> databases may be significantly different
> 

If we are still talking about the 4th tab, the history is lost when you
quit the query tool. So I don't really see a need to separate history
between servers. Actually, if you want to do that, open a query tool per
server.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: Query history

От
Kozusznik Michal
Дата:
> By query history, you mean the 4th tab in the query tool? or the
> combobox?

I meant the combobox.

> Well, this would be a lot of work, something not reasonable to do. The
> probably hardest part of it would be to find individual queries; Good
> luck with that.
>
> Right now, we send to the server everything or only the selected part.
> And we know if everything went fine, or if there was an error.

great, so you know what to store into history. just commands sent to a server. nothing more. currently you store whole
scripteven if single line of it has been sent. 
worse is, you store the same whole script multiple times flooding history (combo box). Inend up with all history
entriesfilled by the same script. 

just try example I gave you in the first post.



Re: Query history

От
Guillaume Lelarge
Дата:
On Wed, 2012-07-25 at 22:57 +0000, Kozusznik Michal wrote:
> > By query history, you mean the 4th tab in the query tool? or the
> > combobox?
> 
> I meant the combobox.
> 

If you meant the combobox, it's a complete different story.

The combobox doesn't get the whole query. It gets truncated at 1024
characters per defaut.

> > Well, this would be a lot of work, something not reasonable to do. The
> > probably hardest part of it would be to find individual queries; Good
> > luck with that.
> > 
> > Right now, we send to the server everything or only the selected part.
> > And we know if everything went fine, or if there was an error.
> 
> great, so you know what to store into history. just commands sent to a server. nothing more. currently you store
wholescript even if single line of it has been sent.
 

Crap, seems you're right. Working on it.

> worse is, you store the same whole script multiple times flooding history (combo box). Inend up with all history
entriesfilled by the same script.
 
> 

Should not happen, this has been fixed. I'll check once the first issue
has been fixed.

> just try example I gave you in the first post.
> 

Knowing what you're talking about helps a lot to reproduce issues :)


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: Query history

От
Guillaume Lelarge
Дата:
On Thu, 2012-07-26 at 09:14 +0200, Guillaume Lelarge wrote:
> On Wed, 2012-07-25 at 22:57 +0000, Kozusznik Michal wrote:
> > > By query history, you mean the 4th tab in the query tool? or the
> > > combobox?
> > 
> > I meant the combobox.
> > 
> 
> If you meant the combobox, it's a complete different story.
> 
> The combobox doesn't get the whole query. It gets truncated at 1024
> characters per defaut.
> 
> > > Well, this would be a lot of work, something not reasonable to do. The
> > > probably hardest part of it would be to find individual queries; Good
> > > luck with that.
> > > 
> > > Right now, we send to the server everything or only the selected part.
> > > And we know if everything went fine, or if there was an error.
> > 
> > great, so you know what to store into history. just commands sent to a server. nothing more. currently you store
wholescript even if single line of it has been sent.
 
> 
> Crap, seems you're right. Working on it.
> 

Fixed.

> > worse is, you store the same whole script multiple times flooding history (combo box). Inend up with all history
entriesfilled by the same script.
 
> > 
> 
> Should not happen, this has been fixed. I'll check once the first issue
> has been fixed.
> 

You're right on this too. I'll work on this when I get some time today.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com



Re: Query history

От
Guillaume Lelarge
Дата:
On Thu, 2012-07-26 at 09:26 +0200, Guillaume Lelarge wrote:
> On Thu, 2012-07-26 at 09:14 +0200, Guillaume Lelarge wrote:
> > On Wed, 2012-07-25 at 22:57 +0000, Kozusznik Michal wrote:
> > > > By query history, you mean the 4th tab in the query tool? or the
> > > > combobox?
> > > 
> > > I meant the combobox.
> > > 
> > 
> > If you meant the combobox, it's a complete different story.
> > 
> > The combobox doesn't get the whole query. It gets truncated at 1024
> > characters per defaut.
> > 
> > > > Well, this would be a lot of work, something not reasonable to do. The
> > > > probably hardest part of it would be to find individual queries; Good
> > > > luck with that.
> > > > 
> > > > Right now, we send to the server everything or only the selected part.
> > > > And we know if everything went fine, or if there was an error.
> > > 
> > > great, so you know what to store into history. just commands sent to a server. nothing more. currently you store
wholescript even if single line of it has been sent.
 
> > 
> > Crap, seems you're right. Working on it.
> > 
> 
> Fixed.
> 
> > > worse is, you store the same whole script multiple times flooding history (combo box). Inend up with all history
entriesfilled by the same script.
 
> > > 
> > 
> > Should not happen, this has been fixed. I'll check once the first issue
> > has been fixed.
> > 
> 
> You're right on this too. I'll work on this when I get some time today.
> 

Finally fixed. Thanks for the report.


-- 
Guillaume
http://blog.guillaume.lelarge.info
http://www.dalibo.com