R
R
Roman Kozhevnikov2014-10-15 17:30:26
MySQL
Roman Kozhevnikov, 2014-10-15 17:30:26

What spends more resources: JOIN or SELECT?

Which is better: to make a lot of tables (in case the search for values ​​in large tables consumes a lot of resources), or few tables (in case opening new tables consumes resources in itself, regardless of their content)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AxisPod, 2014-10-15
@Most998

It's like asking which is heavier, a crowbar or a sledgehammer, a kettlebell and a dumbbell. Well, and so on.
It all depends on the situation, on the database, on the type of storage, on conditions, on indexes, on free resources, on the query execution plan. There are a lot of factors and it is possible to evaluate only on specific requests and specific data.

G
Georgy Pichugin, 2015-01-28
@Cresh

and there is also oracle timesten (it is implemented in version 12 of oracle) and with enough RAM everything hangs in memory and as you might guess for the database it is equivalent to search one or many tables and queries with join and select after compilation will generally be identical
Although you generally have a question put it wrong in the subject select is the query type and join is the type of where clause

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question