php-general Digest 1 Nov 2011 13:24:10 -0000 Issue 7548
Topics (messages 315570 through 315575):
Re: Exporting large data from mysql to html using php
315570 by: Jim Lucas
315571 by: Jason Pruim
315572 by: Ashley Sheridan
ÄãÓᦱ¦Âð£¿Ãâ·ÑË͸ø±¦±¦µÄÀñÎï¡£
315573 by: °®±¦±¦,´ÏÃ÷±¦±¦,¿É°®±¦±¦
315574 by: Sharl.Jimh.Tsin
Placing the masterpassword
315575 by: Florian Müller
Administrivia:
To subscribe to the digest, e-mail:
php-general-digest-subscr...@lists.php.net
To unsubscribe from the digest, e-mail:
php-general-digest-unsubscr...@lists.php.net
To post to the list, e-mail:
php-gene...@lists.php.net
----------------------------------------------------------------------
--- Begin Message ---
On 10/24/2011 5:50 PM, Jason Pruim wrote:
> Now that I've managed to list 3 separate programming languages and somewhat
> tie it back into php here's the question...
>
> I have about 89 million records in mysql... the initial load of the page
> takes 2 to 3 minutes, I am using pagination, so I have LIMIT's on the SQL
> query's... But they just aren't going fast enough...
>
> What I would like to do, is pull the data out of MySQL and store it in the
> HTML files, and then update the HTML files once a day/week/month... I can
> figure most of it out... BUT... How do I automatically link to the individual
> pages?
>
> I have the site working when you pull it from MySQL... Just the load time
> sucks... Any suggestions on where I can pull some more info from? :)
>
> Thanks in advance!
>
>
> Jason Pruim
> li...@pruimphotography.com
>
Jason,
How large a data set are you starting with? How many records in all.
Will you show us your DB schema?
--
Jim Lucas
http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/
C - (541) 408-5189
O - (541) 323-9113
H - (541) 323-4219
--- End Message ---
--- Begin Message ---
Jason Pruim
li...@pruimphotography.com
On Oct 31, 2011, at 7:11 PM, Jim Lucas wrote:
> On 10/24/2011 5:50 PM, Jason Pruim wrote:
>> Now that I've managed to list 3 separate programming languages and somewhat
>> tie it back into php here's the question...
>>
>> I have about 89 million records in mysql... the initial load of the page
>> takes 2 to 3 minutes, I am using pagination, so I have LIMIT's on the SQL
>> query's... But they just aren't going fast enough...
>>
>> What I would like to do, is pull the data out of MySQL and store it in the
>> HTML files, and then update the HTML files once a day/week/month... I can
>> figure most of it out... BUT... How do I automatically link to the
>> individual pages?
>>
>> I have the site working when you pull it from MySQL... Just the load time
>> sucks... Any suggestions on where I can pull some more info from? :)
>>
>> Thanks in advance!
>>
>>
>> Jason Pruim
>> li...@pruimphotography.com
>>
>
> Jason,
>
> How large a data set are you starting with? How many records in all.
>
> Will you show us your DB schema?
Hey Jim,
I am working with 89 Million records right now... Going to be expanding to a
much larger dataset as the site expands.
Here is the main table that I am using:
mysql> describe main;
+------------+-------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------+-------------+------+-----+---------+----------------+
| areacode | int(3) | NO | MUL | NULL | |
| exchange | int(3) | NO | | NULL | |
| subscriber | char(4) | NO | | NULL | |
| id | int(11) | NO | PRI | NULL | auto_increment |
| state | varchar(20) | YES | | NULL | |
| config | text | YES | | NULL | |
+------------+-------------+------+-----+---------+----------------+
config is just going to contain varius settings for commenting on records, and
future expansion. State will actually be the state spelled out.
Thanks for taking a looking!
--- End Message ---
--- Begin Message ---
On Mon, 2011-10-31 at 19:29 -0400, Jason Pruim wrote:
> Jason Pruim
> li...@pruimphotography.com
>
>
>
> On Oct 31, 2011, at 7:11 PM, Jim Lucas wrote:
>
> > On 10/24/2011 5:50 PM, Jason Pruim wrote:
> >> Now that I've managed to list 3 separate programming languages and
> >> somewhat tie it back into php here's the question...
> >>
> >> I have about 89 million records in mysql... the initial load of the page
> >> takes 2 to 3 minutes, I am using pagination, so I have LIMIT's on the SQL
> >> query's... But they just aren't going fast enough...
> >>
> >> What I would like to do, is pull the data out of MySQL and store it in the
> >> HTML files, and then update the HTML files once a day/week/month... I can
> >> figure most of it out... BUT... How do I automatically link to the
> >> individual pages?
> >>
> >> I have the site working when you pull it from MySQL... Just the load time
> >> sucks... Any suggestions on where I can pull some more info from? :)
> >>
> >> Thanks in advance!
> >>
> >>
> >> Jason Pruim
> >> li...@pruimphotography.com
> >>
> >
> > Jason,
> >
> > How large a data set are you starting with? How many records in all.
> >
> > Will you show us your DB schema?
>
> Hey Jim,
>
> I am working with 89 Million records right now... Going to be expanding to a
> much larger dataset as the site expands.
>
> Here is the main table that I am using:
>
> mysql> describe main;
> +------------+-------------+------+-----+---------+----------------+
> | Field | Type | Null | Key | Default | Extra |
> +------------+-------------+------+-----+---------+----------------+
> | areacode | int(3) | NO | MUL | NULL | |
> | exchange | int(3) | NO | | NULL | |
> | subscriber | char(4) | NO | | NULL | |
> | id | int(11) | NO | PRI | NULL | auto_increment |
> | state | varchar(20) | YES | | NULL | |
> | config | text | YES | | NULL | |
> +------------+-------------+------+-----+---------+----------------+
>
>
>
> config is just going to contain varius settings for commenting on records,
> and future expansion. State will actually be the state spelled out.
>
> Thanks for taking a looking!
>
>
I'd put the spelling of the state in another table and just include the
reference to it in this table, it will save a lot on storage and it's
easy to do a join to get it. That way, it's also much faster to look up
entries by state, as a numerical index is quicker that a string index.
On the subject of indexes, what other ones do you have apart from the
primary key there?
--
Thanks,
Ash
http://www.ashleysheridan.co.uk
--- End Message ---
--- Begin Message ---
大惊喜,免费送给宝宝的礼物。
你有宝宝吗?免费送给宝宝的礼物。
乐智小天地体验礼物索取活动,很多免费礼物、玩具哦
■ 只要注册,就能索取,快点索取送给宝宝吧
■ 只要注册,就能索取,免费索取 DVD光盘10张,快点索取送给宝宝吧
http://www.buyersnet.info/google.asp?q=1
http://www.buyersnet.info/google.asp?q=1
http://www.buyersnet.info/google.asp?q=1
http://www.buyersnet.info/google.asp?q=1
http://www.buyersnet.info/google.asp?q=1
--- End Message ---
--- Begin Message ---
在 2018-10-31三的 17:19 +0800,爱宝宝,聪明宝宝,可爱宝宝写道:
> 大惊喜,免费送给宝宝的礼物。
> 你有宝宝吗?免费送给宝宝的礼物。
> 乐智小天地体验礼物索取活动,很多免费礼物、玩具哦
> ■ 只要注册,就能索取,快点索取送给宝宝吧
> ■ 只要注册,就能索取,免费索取 DVD光盘10张,快点索取送给宝宝吧
>
> http://www.buyersnet.info/google.asp?q=1
> http://www.buyersnet.info/google.asp?q=1
> http://www.buyersnet.info/google.asp?q=1
> http://www.buyersnet.info/google.asp?q=1
> http://www.buyersnet.info/google.asp?q=1
>
>
>
>
>
advertisement,ban it plz.
--
Best regards,
Sharl.Jimh.Tsin (From China **Obviously Taiwan INCLUDED**)
Using Gmail? Please read this important notice:
http://www.fsf.org/campaigns/jstrap/gmail?10073.
signature.asc
Description: This is a digitally signed message part
--- End Message ---
--- Begin Message ---
Hi all
I got a little question about a good application design in PHP.
If I use a mysql connection for example, I have to store my mysql-password
somewhere in the code. If it's just in the mysql-class, that's not that good,
because if somebody changes the functionality, he'd see it.
I also can't store it in a text file. Until now, I just created a password
class where all the passwords are described and i can get them by a
get-function.
Where are passwords stored in the big applications? There has to be at least
one big masterpassword somewhere - how can I store it safely? How is this
problem solved in big systems in production?
Thanks for help ;) Regs, Flo.
--- End Message ---