rdbms

Are all kinds of procedural code stored on server side, once created? How are they stored?

只愿长相守 提交于 2019-12-02 21:46:11
问题 Are all kinds of procedural code (stored procedure, functions, views and triggers) stored on database or database management system server, once created, regardless of how they are created (for example, typing their definitions interactively in a command-line client of the database management system)? I am asking this because in the command-line client of a RDBMS (such as postgresql, mysql, server sql), when typing a query statement, the query statement isn't stored any where. in an

Best Way to Store/Access a Directed Graph

 ̄綄美尐妖づ 提交于 2019-12-02 18:28:27
I have around 3500 flood control facilities that I would like to represent as a network to determine flow paths (essentially a directed graph). I'm currently using SqlServer and a CTE to recursively examine all the nodes and their upstream components and this works as long as the upstream path doesn't fork alot. However, some queries take exponentially longer than others even when they are not much farther physically down the path (i.e. two or three segments "downstream") because of the added upstream complexity; in some cases I've let it go over ten minutes before killing the query. I'm using

Optimizing a query returning a lot of records, a way to avoid hundreds of join. Is it a smart solution?

冷暖自知 提交于 2019-12-02 17:04:37
问题 I am not so int SQL and I have the following doubt about how to optimize a query. I am using MySql I have this DB schema: And this is the query that returns the last price (the last date into the Market_Commodity_Price_Series table) of a specific commodity into a specific market. It contains a lot of join to retrieve all the related information: SELECT MCPS.id AS series_id, MD_CD.market_details_id AS market_id, MD_CD.commodity_details_id AS commodity_id, MD.market_name AS market_name, MCPS

Make a column positive only

☆樱花仙子☆ 提交于 2019-12-02 14:44:42
问题 Happy new year everyone. I will ask my last question for this evening. I was wondering if it's possible in MS Access to make a column positive only. Since my approach of getting the exact number will only work if the column is >0. So when a number is <0 I want it to be 0 or 'notthing' This is the whole code (((([Factuur]![EindKMStand]-[Factuur]![BeginKMStand])-([Factuur]![Dagen]*125))*[Prijzen]![ExtraKM])+([Prijzen]![dag125KM]*[Factuur]![Dagen])) AS TotaalPrijs This part have to be 0> or =0 (

Why is Solr so much faster than Postgres?

ε祈祈猫儿з 提交于 2019-12-02 13:52:33
I recently switched from Postgres to Solr and saw a ~50x speed up in our queries. The queries we run involve multiple ranges, and our data is vehicle listings. For example: "Find all vehicles with mileage < 50,000, $5,000 < price < $10,000, make=Mazda..." I created indices on all the relevant columns in Postgres, so it should be a pretty fair comparison. Looking at the query plan in Postgres though it was still just using a single index and then scanning (I assume because it couldn't make use of all the different indices). As I understand it, Postgres and Solr use vaguely similar data

When NOT to use Cassandra?

喜你入骨 提交于 2019-12-02 13:47:53
There has been a lot of talk related to Cassandra lately. Twitter, Digg, Facebook, etc all use it. When does it make sense to: use Cassandra, not use Cassandra, and use a RDMS instead of Cassandra. ajay There is nothing like a silver bullet, everything is built to solve specific problems and has its own pros and cons. It is up to you, what problem statement you have and what is the best fitting solution for that problem. I will try to answer your questions one by one in the same order you asked them. Since Cassandra is based on the NoSQL family of databases, it's important you understand why

Make a column positive only

邮差的信 提交于 2019-12-02 10:32:16
Happy new year everyone. I will ask my last question for this evening. I was wondering if it's possible in MS Access to make a column positive only. Since my approach of getting the exact number will only work if the column is >0. So when a number is <0 I want it to be 0 or 'notthing' This is the whole code (((([Factuur]![EindKMStand]-[Factuur]![BeginKMStand])-([Factuur]![Dagen]*125))*[Prijzen]![ExtraKM])+([Prijzen]![dag125KM]*[Factuur]![Dagen])) AS TotaalPrijs This part have to be 0> or =0 ((([Factuur]![EindKMStand]-[Factuur]![BeginKMStand])-([Factuur]![Dagen]*125)) is there a way to do this

Optimizing a query returning a lot of records, a way to avoid hundreds of join. Is it a smart solution?

久未见 提交于 2019-12-02 08:32:26
I am not so int SQL and I have the following doubt about how to optimize a query. I am using MySql I have this DB schema: And this is the query that returns the last price (the last date into the Market_Commodity_Price_Series table) of a specific commodity into a specific market. It contains a lot of join to retrieve all the related information: SELECT MCPS.id AS series_id, MD_CD.market_details_id AS market_id, MD_CD.commodity_details_id AS commodity_id, MD.market_name AS market_name, MCPS.price_date AS price_date, MCPS.avg_price AS avg_price, CU.ISO_4217_cod AS currency, MU.unit_name AS

Are all kinds of procedural code stored on server side, once created? How are they stored?

一世执手 提交于 2019-12-02 07:47:14
Are all kinds of procedural code (stored procedure, functions, views and triggers) stored on database or database management system server, once created, regardless of how they are created (for example, typing their definitions interactively in a command-line client of the database management system)? I am asking this because in the command-line client of a RDBMS (such as postgresql, mysql, server sql), when typing a query statement, the query statement isn't stored any where. in an interactive command-line REPL for a general purpose programming language, when typing the definition of a

RDBMS : Move frequently updated columns into a separate table

南笙酒味 提交于 2019-12-02 07:03:27
I have a table Users (simplified) : UserId (int, PK) | Username | PasswordHash | LastVisitTimestamp Every time user visits a web site, LastVisitTimestamp column is updated. Is it a good idea to move that column into a separate table, so that timestamp updates do not lock entire row (actual row is bigger than presented here). I did that because I was frequently getting "row modified" exception when updating user information (result of update with optimistic concurrency). Or is there a better (preferred) way to handle this? Yes, this is totally legit way of solving the problem. Another ideas are