Hi!
I want to parse a query (SFW) and create new queries: one for each table referenced, if that possible.
I've written a function for this in the Query struct level after parse&rewrite (not very general ofcourse :-)) but I would like to know whether there is any code written for this purpose at any level. Are there any algorithms for this?
Following, is there any code or at least some algorithm about merging the individual results returned from these queries?
Thanks in advance!
Ntinos Katsaros 4 4826
Hi,
On Tue, 2004-11-02 at 07:47, Katsaros Kwn/nos wrote: Hi!
I want to parse a query (SFW) and create new queries: one for each table referenced, if that possible. I've written a function for this in the Query struct level after parse&rewrite (not very general ofcourse :-)) but I would like to know whether there is any code written for this purpose at any level. Are there any algorithms for this? Following, is there any code or at least some algorithm about merging the individual results returned from these queries?
The latter is easy. Consider:
SELECT ... FROM
(SELECT ... first query here) AS table_a
JOIN
(SELECT ... second query here) AS table_b
USING (same_column);
(or ON table_a.column = table_b.column)
I dont think you should think about joining results
outside the database. You have Postgresql here, remember :-)
Regards
Tino
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly
Hi,
On Tue, 2004-11-02 at 07:47, Katsaros Kwn/nos wrote: Hi!
I want to parse a query (SFW) and create new queries: one for each table referenced, if that possible. I've written a function for this in the Query struct level after parse&rewrite (not very general ofcourse :-)) but I would like to know whether there is any code written for this purpose at any level. Are there any algorithms for this? Following, is there any code or at least some algorithm about merging the individual results returned from these queries?
The latter is easy. Consider:
SELECT ... FROM
(SELECT ... first query here) AS table_a
JOIN
(SELECT ... second query here) AS table_b
USING (same_column);
(or ON table_a.column = table_b.column)
I dont think you should think about joining results
outside the database. You have Postgresql here, remember :-)
Regards
Tino
---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postg resql.org so that your
message can get through to the mailing list cleanly
Well, the second question is trivial indeed :-) ,even though I had
pipelining in mind when writting it...
(which is not so query oriented but rather plan/executor oriented)
However, I'm more interested in the first question.
Thank you very much,
Ntinos
Tino Wildenhain wrote: Hi,
On Tue, 2004-11-02 at 07:47, Katsaros Kwn/nos wrote: Hi!
I want to parse a query (SFW) and create new queries: one for each table referenced, if that possible. I've written a function for this in the Query struct level after parse&rewrite (not very general ofcourse :-)) but I would like to know whether there is any code written for this purpose at any level. Are there any algorithms for this? Following, is there any code or at least some algorithm about merging the individual results returned from these queries?
The latter is easy. Consider:
SELECT ... FROM (SELECT ... first query here) AS table_a JOIN (SELECT ... second query here) AS table_b USING (same_column);
(or ON table_a.column = table_b.column)
I dont think you should think about joining results outside the database. You have Postgresql here, remember :-)
Regards Tino
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html
Well, the second question is trivial indeed :-) ,even though I had
pipelining in mind when writting it...
(which is not so query oriented but rather plan/executor oriented)
However, I'm more interested in the first question.
Thank you very much,
Ntinos
Tino Wildenhain wrote: Hi,
On Tue, 2004-11-02 at 07:47, Katsaros Kwn/nos wrote: Hi!
I want to parse a query (SFW) and create new queries: one for each table referenced, if that possible. I've written a function for this in the Query struct level after parse&rewrite (not very general ofcourse :-)) but I would like to know whether there is any code written for this purpose at any level. Are there any algorithms for this? Following, is there any code or at least some algorithm about merging the individual results returned from these queries?
The latter is easy. Consider:
SELECT ... FROM (SELECT ... first query here) AS table_a JOIN (SELECT ... second query here) AS table_b USING (same_column);
(or ON table_a.column = table_b.column)
I dont think you should think about joining results outside the database. You have Postgresql here, remember :-)
Regards Tino
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faqs/FAQ.html This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: uc_sk |
last post by:
Hello All
I am a newbie to PERL language...If i have a file with data of form
abcd 4 {1,2,3} 3
lmn- 3 {12,18,19,22} 4
then i can read them as...
($list $listTotal $set $noElements) = split / /
But if i have a dataset of the form:
|
by: middletree |
last post by:
Sorry for starting a new thread, but the original was 24 hours ago, and I am
afraid it won't get seen.
In the original, Ray advised me to change
if len(strPeopleID)>0 then
arrPeople = SPLIT(strPeople,",")
for x=lbound(arrPeople) to ubound(arrPeople)
strSQL = "INSERT into PersonalPeople(PersonalID,PeopleID) "
|
by: needin4mation |
last post by:
Hi, thanks for any help here:
SqlCommand cmd = new SqlCommand("SELECT categories FROM catalog"
conn);
rdr = cmd.ExecuteReader();
String temp;
while (rdr.Read())
{
temp = rdr;
Response.Write(temp.Split(":"));
|
by: ronrsr |
last post by:
I'm trying to break up the result tuple into keyword phrases. The
keyword phrases are separated by a ; -- the split function is not
working the way I believe it should be. Can anyone see what I"m doing
wrong?
bests,
-rsr-
|
by: garyusenet |
last post by:
string lines = File.ReadAllLines(@"c:\text\history.txt");
foreach (string s in lines)
{
ArrayList results = new ArrayList();
string delimit = ";";
string currentline = s.Split(";");
MessageBox.Show(s);
| |
by: Stan |
last post by:
I am working on a database in ACCESS 2003. This is a simple DB with
only one table. I have split the DB so I can upgrade and debug the
front end before installing on my clients' computer. I used the
ACCESS splitter utility and everything appeared to go OK. If I run
"Copy of DB_be.mdb" I see only the table, not the Queries or Forms.
When I run the front end "Copy of DB.mdb" I see the Queries and
Forms. but, I also see the Table. If I...
|
by: =?ISO-8859-15?Q?C=E9dric?= |
last post by:
Hi all,
I want to import a SQL script (SQLite) executing each queries separately.
- I read the SQL file
- I split the read string with the separator ";"
- I execute each query
string query = File.ReadAllText("C:\\script.sql");
string str = query.Split(';');
|
by: mikevde |
last post by:
Hi,
I have a query where I select all the values from my MS SQL table that are LIKE a certain string. The query works, but in the ASP page, I only want to write the date once, while writing the values from the other column in all cases.
To illustrate, i have a table that looks like this:
ID Date Name
1 2007/01/01 city_house
2 2007/01/02 city_farm
3 2007/01/02 city_house
|
by: kumarboston |
last post by:
Hi All,
I fetched a sequence from my database into mysql_query and then I want to split in the group of 60 and print it. I am using while loop and pushing into array and then trying to split it and print it on the web page but its nor working????
here is the code:
$res_fasta = mysql_query($fasta) or die('Query failed: ' . mysql_error());
while($seq = mysql_fetch_array($res_fasta))
{
array_push($arr,"{$seq}");
|
by: bugboy |
last post by:
Does the total number of rows in a table determine the amount of resources required for a query?.. or is it primarily determined by the number of rows used by the query? ..Does an INDEX mean it doesn't have to read every row to find data?
Context:
I have a large dataset and am wondering if i should split it up into several smaller tables to reduce the resources required to search it... i would then have to predetermine which table to do the...
|
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: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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...
| |