I am trying to determine which tables in my database are being joined
and by what columns. I then came up with a query against
EXPLAIN_PREDICA TE that returns rows similar to the following:
(Q1.PERIOD_KEY = Q2.PERIOD_KEY)
My problem is tying this Q1 & Q2 back to a tablename? Does anyone
know how this may be done? Or perhaps a suggestion on how better to
obtain this information.
Thanks in advance for your ideas! 1 1509
You'll need to investigate the column defs. of the other explain tables.
For each query explained, the facility will identify each table name
(MYTBL1, MYTBL2, HISTBL3, ...) in the query and the query graph model in the
query rewrite will rename those tables as Q1.MYTBL2, Q2.HISTBL3,Q3.M YTBL1.
I think the Q1, Q2, Q3 specifies the order in which the tables are accessed.
The EXPLAIN_OBJECT table may have the relationship between HISTBL3 and
Q2.HISTBL3 but I'm not sure.
HTH, Pierre.
--
Pierre Saint-Jacques
SES Consultants Inc.
514-737-4515
"mike_dba" <mi************ *@yahoo.coma écrit dans le message de news: 11************* ********@j27g20 00...legro ups.com...
>I am trying to determine which tables in my database are being joined
and by what columns. I then came up with a query against
EXPLAIN_PREDICA TE that returns rows similar to the following:
(Q1.PERIOD_KEY = Q2.PERIOD_KEY)
My problem is tying this Q1 & Q2 back to a tablename? Does anyone
know how this may be done? Or perhaps a suggestion on how better to
obtain this information.
Thanks in advance for your ideas! This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: DBNovice |
last post by:
I have a database that keeps records on the issue and failure of an item.
Currently, the database is poorly desisned; therefore I'm performing queries
to break the data into normalized tables and attempting to perform a "left
join" query to build a cross-reference table.
The left join query is currently taking nearly 2 hours for MySQL to process,
using Navicat as a front-end. My system specs are 1.4Mhz Pentium Processor
with 1GB of RAM...
|
by: ruben |
last post by:
Hi:
I must have missed something, but how is it possible that a join on
tables A and B is faster (a lot faster) than a query to one of the
tables with the same conditions?
The problem seems to be with the query plan, in the case os a query to
table_a only, the planner executes a "Seq Scan", in the case of a join,
an "Index Scan". table_a has about 4M records, so the difference is
quite noticeable.
|
by: Dmitry Tkach |
last post by:
Hi, everybody!
Here is a weird problem, I ran into...
I have two huge (80 million rows each) tables (a and b), with id as a PK
on both of them and also an FK from b referencing a.
When I try to run a query like:
select * from a, b where a.id >= 7901288 and a.id=b.id limit 1;
The query takes *forever*.
|
by: Mike Leahy |
last post by:
Hello all,
This question is related to updating tables - is there any way to calculate or
update the values in a column in a table to the values in a field produced by
a query result? An example of what I'm trying to do is below:
update (tbl_ind_mananas LEFT JOIN (select count(*) as count, (dubicacion ||
zona || manzana) as cod_manzana from tbl_censo_poblacion_1993 group by
dubicacion, zona, manzana) tbl1 on relacion = cod_manzana) as...
|
by: Lyn |
last post by:
This one is difficult to explain, so I will cut it down to the basics.
I have a major table 'tblA' which has an autonum field 'ID-A' as primary key
(of no significance to users). 'tblA' contains many fields including
picture and memo fields. The main user-selectable field is 'NameA'.
There is also a crossreference table (let's call it 'tblB') which provides a
secondary method of accessing records in 'tblA'. The main fields in 'tblB'...
| |
by: Ben |
last post by:
My question, pulled out of my source code comments:
// This search is SLOW when WHERE is just zcustnum. This is inexplicable
// to me, as the WHERE and ON conditions only reference zcustnum directly
// in both tables, and in both instances there are btree indexes for them.
// It seems to me that such a search ought to be almost instantaneous; the
// ordered lists of zcustnum in the indexes should make the ON and WHERE
// clauses...
|
by: CSN |
last post by:
I have a pretty simple select query that joins a table
(p) with 125K rows with another table (pc) with almost
one million rows:
select p.*
from product_categories pc
inner join products p
on pc.product_id = p.id
where pc.category_id = $category_id
order by p.title
|
by: Chris Smith |
last post by:
I've just noticed in the regular profiling information from our web
application that a particular query on a fairly small database is taking about
15 seconds. The query is generated from software on the fly, hence its
quirkiness -- if any of that is the problem, then I'll go ahead and fix it,
but I can't imagine a few repeated WHERE conditions fooling the query
optimizer.
Anyway, I don't know how to interpret query plans. Can anyone...
|
by: jsacrey |
last post by:
Hey everybody, got a secnario for ya that I need a bit of help with.
Access 97 using linked tables from an SQL Server 2000 machine.
I've created a simple query using two tables joined by one field
between them. The join field in both tables are indexed and I'm
selecting 1 field from each table to lookup. The Access query is
taking more than 60 second to retrieve 1 record and if I execute the
same query within the Query Analyzer, it...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |