I’d like to return multiple values from the same record, with different columns of the same type appended under one another. I could do multiple joins, but that seems very inefficient because of the multiple table scans. Returns: VisID Vis Home HomeID arenn001 Nolan Arenado Colin Moran morac001 badeh001 Harrison Bader Anthony Alford alfoa002 carld002 Dylan Carlson Yoshi Tsutsugo tsuty001
Tag: database-performance
How to store number in shortest possible size?
I will be adding comments into my website and I want to have a tree structure so each comment can have a parent. This creates a problem when retrieving comments because each comment would have to be traversed for children and this is unacceptable when it comes to database storage. There are various solutions to this well known performance problem
Select distinct very slow
I have a table where I store rows with external ids. Quite often I need to select latest timestamp for given external ids. Now it is a bottleneck for my app Query: Explain: What could I do to make this query faster? Or probably should I use completely different query? UPDATE: Added new query plan as asked @jahrl. It looks
How does i/o on database relate to query type
So I have metrics that look like this. And here is my dumb question… Does the rw i/o directly correlate to rw query? Using the example below, does that mean there was increased read query activity? I don’t have some flags enabled yet to have metrics on the transaction level, but i’ll eventually do so it’s a blackbox for now.
Does adding the guaranteed where condition on sql can improve performance?
Let’s say there’s a table about logging website access. (id is the only index column) | id | domain | logged_at | |—-|————|————————–| | 1 | yahoo.com |…
PostgreSQL: Bad query performance caused by unused index?
we have a query to get all jobs with changes inside a certain time period. Depending on the selected period the performance goes from <100 milliseconds for a day to ~7 seconds for a week. I found ...
Select a conversation between exact users (by users IDs)
I’m woking on a simple chat app. It should allow users to run conversations user-to-user or in groups (multiple users). So here are my tables: table users ID | username | … table …
MS ACCESS SQL Join Subquery
I have two tables: newparts, storedparts I insert the parts of the newparts, which are not jet in the storedparts into the storedparts: This is working fine so far. Now the Problem: Table storedparts is getting so big that the programm is taking too Long for the join process. My solution: Just compare the newparts not to all parts of