Rank suggestions by popularity
I would like to suggest a ranking feature when the suggestions list appears. At my place of work, if I want to select out of the customer table I will often type 'cu' then tab the rest. However this is the snippet for creating a user. This is also useful when many tables begin with the same prefix, but one is used far more often than others. With ranking, the more an object is used, the higher up the list it will appear, like browser history entries in Firefox for instance. This would reduce the number of keystrokes necessary and speed up code creation
On 14th May we released Prompt 9.5.3 which includes a feature to show recently used suggestions.
This will be the first iteration of work to rank suggestions so we’re keen to hear feedback and ideas for improvement.
More details in the release notes here: https://documentation.red-gate.com/sp9/release-notes-and-other-versions/sql-prompt-9-5-release-notes
I hate this feature, I turned it down
Piotr L commented
For me, this is the killer feature of the 9.* series of SQL Prompt.
It is a bit annoying though that the rank get re-set after each SSMS restart.
Is there much work to implement rank persistence between sessions?
Terence Hinrichsen commented
I am happy to say that you have really changed my life here! Thanks Redgate!
One more addition to my previous comment. One other problem I've seen is that we have a database that is the same as our local Domain name. And in our dev db's some users have uploaded files under schemas using their windows auth login. Lets call it "Foobar"
So we have a database called Foobar, and then there are people who have loaded flat files using schemas like "[FOOBAR\chad]"
So now on that server, when I type SELECT * FROM Foo...[TAB]...
Instead of it auto completeing to SELECT * FROM Foobar
It instead autocompletes to SELECT * FROM [FOOBAR\chad]
Again, this feature would solve that. (So would removing those annoying schemas, but that isn't my responsibility, this would at least make it easier on me)
I love this! We have a table called "Entity", up till now, I just typed En and tabbed the rest. Recently we deployed a new table called "Engagement", so now, when I type "En" and then tab...it puts in the Engagement table instead, which is a table I will probably query once a year. VS the entity table I query probably 30 times a day +.
I know I can just type one letter more, with "Ent" and then tab...but the muscle memory is already there, and it's quite annoying that I constantly keep tabbing in the Engagement table. This feature would definitely solve that problem.
Is this option too hard to implement or do you all just hate it? It has been around for a long time and has several votes in support of it. Can Red-gate respond with some feedback?
Terence Hinrichsen commented
As a whole, this issue seems to be my biggest drawback with SQL Prompt.. It really works extremely well, but has forced me to type out certain table names as the intellisense is completely messed up.. Sorting the suggestions (so the shorted names are first) would also really help me.
Roland Andrag commented
Even an alphabetical sort which brought up the shorter table names first (i.e. dbo.item before dbo.ItemWarehouse before dbo.ItemWarehouseStatistics) would be a large step forward..
And a default schema would also be great...
What is the status on this feature? It has been around for quite a while now and is currently in your top 10 list by votes. I run into this every day way too many times to count as what is the most used table I use in queries has moved down the list as other tables have been created since then that start with the same couple of letters. I type fast and miss and select the wrong table multiple times a day. Please save us! :)
Thanks in advance for this and for your awesome product!
I'm the person who originally submitted this, changed employer now so I doubt I can log in as that user still, but it's good to see others have voted for this and feel it is worthwhile. I still believe it to be a useful feature that would make working with complex schemas easier, so hopefully it'll be considered for a future release. I would agree with others that this is a per user thing. It just needs an incremental counter I think, so every time I pick an object, its use count increase by 1, pushing it up the rankings as that's what the suggestions would be ordered on.
David - I agree with Aaron, definitely on a per user basis.
This got my 3 votes. We often have tables with the same or similar names in multiple Schemas and it seems to put the last one created at the top or something, which is often not the most used version. I hope it handles that situation also.
Aaron Bauman commented
I certainly like the sound of this one. I hit the same table just about every day, but due to it's name I have to do a bit of typing or navigating with the arrow keys to reach it. If I types a few of the letters and then navigated to the table and chose it. I would like that table to appear first in the list next time I typed that combo of keys. I use Launchy and have really gotten use to it just remembering what key combination I typed in order to launch an app.
David - this is definitely a per user basis
I think that this is a great idea. Would this float popular / recently used tables to the top on a per user basis, or would it be better if this was done on a team basis?
I have to agree with this as we have tables which start with the same prefix but tend to only use 1 or 2 regularly. Sorting on history would be a great addition to user options as I guess others may not prefer this. Got my vote!