Exclude databases from "database, table, procedure" search in DataGrip - datagrip

Is there any way to limit the search for a table using Cmd+O ("database, table, procedure" search in DataGrip) to the current schema, open databases, or in some other way?
I have many databases with the same structure for different envs, and it is difficult to use the search because I need to go through the list of found tables to choose the one I'm interested in.

I am Max from DataGrip. There is no such possibility now. But we're totally agree that current implementation is inconvenient. We have been discussing this while creating our roadmap for 2018, and I hope we'll create an easy way to define various scopes in this search.

Related

Filtering the list of tables in JetBrains Datagrip

I have recently started using JetBrains DataGrip as a replacement for HeidiSQL.
My issue relates to the list of tables in the Database Explorer. We have a large database (700+ tables) and scrolling to find the table I'm looking for is rather cumbersome. For a table with a nice, long, specific name I can just start typing and get the highlighting on the table names, which usually takes me right where I need to go:
But if I'm trying to get to the table user and we have lots of other tables with "user" in the name in various positions, the highlighting tool only takes me to the first table with "user" in the name, which is not the actual "user" table (and because we have tables with names like billingUsers, it doesn't scroll to anywhere near the actual user table that I'm looking for).
What other methods should I be using when I want to find a particular table in DataGrip? In HeidiSQL, there was the "filter tables" box which would filter the list of tables based on the search term, which got me much closer to my intended destination much more quickly. Does DataGrip have any sort of "quick filter" like this? Or is there some other tool or prompt I should use to go directly to this table instead?
During the writing of this question I came across the "double Shift" shortcut, which is helpful and closer to what I'm looking for -- though in my case I have several of our development environments configured in DataGrip, and it lists the table in every environment - whereas in the Database Explorer, I usually only have one environment expanded at a time (and only want to see results from that database, not the others).
StackOverflow suggested this question to me, which has the same issue as the double-Shift shortcut -- it shows results from all databases, not just the one I'm working in.
I am from the DataGrip teram. We are currently working on that and expecting the filtering functionality in 2022.3. Anyway, now there are several workarounds (and Shift+Shift is one of them). See them here:
https://youtrack.jetbrains.com/issue/DBE-3017/Show-only-filtered-items-when-typing-in-the-database-explorer

force Oracle to use indexes over DB-Link queries

I use stored proceduers on DB instance "A" to store data in GTT. To get the original data i have to go over a DB-Link to DB instance "B". That for i put together the whole query and send it to remote DB instance.
This works fine. But sometimes it seems that Oracle is not using the best way or correct indexes for queries. Is there a way to force Oracle to use specific indexes? I tried to use hints, but honestly I dind't understand the difference between all these options.
Thanks for helping me!
There is a huge temptation to optimize a query one way when you want it to work another way. Adding hints is a temporary solution which can backfire on you when the amount or type of data in the table changes or when you upgrade to a newer version with a newer optimizer.
First, determine that there is a problem. Are all queries taking too long? Just some? Only the first one?
The easiest thing to do is to make sure the indexes on that table are up to date. Then look at optimizing the query by using the explain plan feature to see what indexes are being used.
It's also prudent to examine your data to see if the query is selecting different things or different amounts of records if it is time based.

Dynamically generate data based notifications platform

In our project we have a requirement to create dynamic notifications that "pop" in our site when a relevant rule applies.
We are based on oracle exadata as our main database.
This feature is suppose to allow the users to create dynamic rules that will be occasionally checked.
These rules may check specific fields in certain types, and may also check these fields relatively to other types field's data.
For example, if our program has a table of cars, with a location column, and another table of streets, with location column (no direct relation between those two tables), we might need to notify the users if a car is in a certain street.
Is there a good platform that can help us calculate the kind of "rules" that we want to check?
We started looking at elasticsearch and neo4j (we have a specific module that involves a graph-like relations..), but we aren't sure that they would be the right solution.
Any idea would be appreciated :)
Neo4j could help you to express your rules, but it sounds as if your disconnected data is rather queried by SQL style joins?
So if you want to express and manage your rules in predicates in the graph you can do that easily and then get a list of applicable rules to trigger queries in other databases.

Adding Advanced Search in ASP.NET MVC 3 / .NET

In a website I am working on, there is an advanced search form with several fields, some of them dynamic that show up / hide depending on what is being selected on the search form.
Data expected to be big in the database and records are spread over several tables in a very normalized fashion.
Is there a recommendation on using a 3rd part search engine, sql server full text search, lucene.net, etc ... other than using SELECT / JOIN queries?
Thank you
Thinking a little outside the box here -
Check out CSLA.NET; Using this framework you can create business objects and "denormalise" your search algorithm.
Either way, be sure the database has proper indexes in place for better performance.
On the frontend youre going to need to use some javascript to map which top level fields show sub level fields. Its pretty straight forward.
For the actual search, I would recommend some flavor of Lucene.
You have your option of the .NET flavor of Lucene.NET which Stackoverflow uses, Solr which is arguably easier to setup and get running than Lucene is, or the newest kid on the block which is ElasticSearch which aims to be schema free and infinitely scalable simply by dropping more instances in the cluster.
I have only used Solr myself, and it has a nice .NET client (SolrNet).
first index your database field that is important and very usable
and for search better use full text search
i try it and result is very different from when i dont use full text
and better use select and join query in stored proc and call sp from your program

Setting Oracle's Column COMMENTS Attribute with NHibernate

One of my larger applications is using NHibernate over an Oracle data store. For testing/development, the application uses NHibernate's schema generation to create/re-create the database when needed. Prior to delivery, one of the things being asked of us by the DBAs is to include Comments for each field in the database (there are a lot). I'm looking for solutions that would let me specify the comment in the mapping file. Has anyone done anything like this? Would NHibernate support this activity with a little effort on my end?
Yes, you can use <database-object> to add any additional artifacts (comments, indexes, triggers, etc) that you need.
See 5.6. Auxiliary Database Objects

Resources