PHP/MySQL - Splitting similar data to two tables and querying as a whole
- From: larry@xxxxxxxxxxxxxxxxx
- Date: 17 May 2005 09:37:36 -0700
Ok I am working on building my skills to convert my apps to LAMP (read
I'm a semi noob), and there was one part I was thinking of. If I
create two identical MySQL tables (we'll say, invoice and invoicearc)
one will hold current period data and the other will hod out of period
data - previous years stuff, which is only used in queries <5% of the
time at most.
Now can I join these two tables to make one table when doing queries
that span the current and prior periods. I've read of joins where you
are linking references, like primary and external keys, but not one
where you are bringing tables of the same structure into a larger
query. I've googled around a bit but cant find the right syntax to
find a yea or nay on if it is possible.
I know I could have mmassive tables and put all of this stuff in there,
but I was thinking I coud improve speed if I were able to just bring in
the archive data only when needed.
.
- Follow-Ups:
- Re: PHP/MySQL - Splitting similar data to two tables and querying as a whole
- From: dracolytch
- Re: PHP/MySQL - Splitting similar data to two tables and querying as a whole
- From: mdeering
- Re: PHP/MySQL - Splitting similar data to two tables and querying as a whole
- From: ZeldorBlat
- Re: PHP/MySQL - Splitting similar data to two tables and querying as a whole
- From: Mike Willbanks
- Re: PHP/MySQL - Splitting similar data to two tables and querying as a whole
- Prev by Date: Re: apache php write permissions
- Next by Date: Re: PHP/MySQL - Splitting similar data to two tables and querying as a whole
- Previous by thread: Problem with simple image generation script
- Next by thread: Re: PHP/MySQL - Splitting similar data to two tables and querying as a whole
- Index(es):
Relevant Pages
|