NOTE: The application is not really about websites or keywords, I am using that here only to provide reference points for discussion.
I have a data set that is really just a string of words. Think of ...

In a relationship one to many or one to one you can limit the relationship of the related table? For example, I have a table 'cliente' and another 'acct', each 'cliente' can have thousands (perhaps ...

I am trying to join two tables both relating to cities. One table has the columns City and Writer, the other has City and Park. I want to end up with a table that has the columns Writer City Park. If ...

I have three tables, representing two entities and a connection relationship. Each of the entity relations has an artificial surrogate key used for foreign key constraints in place of natural keys.
...

I need to be able to take Table A and find the records that match in Table B and Table C based on its ID and add them together. The trick is that I only want to add the results from Table B and Table ...

Recently I got stucked with a table where its grown to +25million and I have got a query that's doing a JOIN on it. The query take 2.5hours to execute even though I got Good 96GB RAM and RAID10 with ...

I have a report that has a header (display the current date), I use UNION to join the header with the main query that returns multiple records, it has 10 columns. After that another UNION for joining ...

I have a table comment and a table price like below. The key columns in both tables are ticker_id, price_datetime and price_open. The last column threshold in table comment (which currently NULL) is ...

I have a table flaggedcomment and a table price.
In flaggedcomment, there are two empty columns Price_DateTime and Price_Open which I want to copy from price, depending on the ON conditions. Query as ...

Say I have 3 tables, A, B , C of sizes 10, 10^4 and 10^6. What is the most efficient way to join them?
This is my reasoning. Assuming you join over primary key, if you join A with C first, you will ...

I'm using Postgres, which enforces the constraint that all columns in a SELECT...GROUP BY must appear in the GROUP BY clause or be used in an aggregate function.
Lets say I'm modelling peoples' cars, ...

I've been experiencing massive slowdown on my server after launching a new website.
Using MONyog I can see that after an apache/mysql restart, the queries/second starts out nice and low for around 10 ...

STUDENT table contains a list of students in my school Database
LIBRARY_BOOK table contains the information of each Book that is with currently with any student.
each student is allowed only 1 book ...

Disclaimer: I am relatively new to PostgreSQL.
I'm wondering how to optimize a query that does 2 INNER JOINs. My scenario is fairly simple:
Select Posts with a photo (Posts.photo IS NOT NULL) and a ...

Testing some commands of MySQL, I've come across these two comands resulting on the same table.
Command 1:
select sales.relatory_code, sales.date, destiny.exportation_name from sales, destiny where ...

I have two cira 600MB tables that I am querying as such:
SELECT id, name, url FROM names, urls WHERE metaphone = 'ALX;FLX' AND urlId = urlRef;
This runs fine on my live server ( ~ 0.02 sec,) but on ...

My question is about 3 tables that stores data of a single entity, and there is a report generation feature that refers these tables and calculate COUNT and AVG information.
There are three tables: ...