angelcool
Members-
Posts
160 -
Joined
-
Last visited
Never
Everything posted by angelcool
-
Hello, I need to to replace the domain name and part of the URL to another domain name. So, http://www.samplesite1.com/subsite/ gets changed for http://www.samplesite2.com That way users going to samplesite2 will see the content of the subsite with samplesite2 domain in browser. any help is apreciated. Thanks
-
Installing unixODBC support from source
angelcool replied to goterpsgo's topic in PHP Installation and Configuration
I just did a ./configure --help and found: NOTE: Not all extensions can be build as 'shared'. Does it must be shared for your needs? I would try without shared keyword. -
Installing unixODBC support from source
angelcool replied to goterpsgo's topic in PHP Installation and Configuration
--with-unixODBC=shared,/export/appl/pkgs/unixodbc/latest \ Why is there a comma there? also do a cd to that directory and make sure the libraries are present. -
Hello community, I have requested a new feature to the PHP Group. What is this feature about? Dynamically populating PDF form templates using FDF/XFDF text files. The goal is the user gets to download the updated version of the PDF template. Feature requests are submitted through the bug reporting section, the feature request id is #61647. ( https://bugs.php.net/bug.php?id=61647 ) Please cast your vote If you think this feature can help you someday. Angel P.S. I hope this is the right section.
-
Removing title path in directory index.
angelcool replied to angelcool's topic in Apache HTTP Server
I figured it out already, just specify a blank header in htacces: HeaderName ../header.html -
Hello community, I want to remove the path in a directory index. http://angelcool.net/NEWangelcool.net I want to remove Index of /angelcool.net/NEWangelcool.net/tutorials . I managed to remove the parent directory link using IndexIgnore .. in htaccess. Does anyone know how to remove the directory path ? Thanks
-
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool replied to angelcool's topic in MySQL Help
For testing, all it stores are random numbers. I am eventually planning to hit 10 GB (now is 1.2GB), and test/feel performance on different queries. -
Do indexing advantages overcome their advantages ?
angelcool replied to angelcool's topic in MySQL Help
Basically what I wanted is the opinion from someone experienced using indexes in big tables (10GB~20~30GB); I am testing MySQL, so far the test table I created reached 1.2 GB, now I can tell/feel how an index(primary key,auto increment) will increase performance for a SELECT query. The table has 10,000,00 rows, a SELECT without index (full scan) takes about 12-18 seconds with an index query the time is less than 1/4 of a second. On the other hand, I have read that the indexes will slow down the speed of writing queries (INSERT, DELETE, UPDATE), since every time a record is changed the indexes must be updated (I understand that a solution for this issue could be setting up replication and redirect all your write queries to the master and read ones to the salves ). So, Does indexing advantages overcome writing disadvantages ? Also, what if it is a complex query that required a comparison in a non-index column in a 30GB table? You executed and go to lunch ? Anyone out there managing a big table/DB? -
Do indexing advantages overcome their advantages ?
angelcool replied to angelcool's topic in MySQL Help
-disadvantages -
Do indexing advantages overcome their advantages for large tables?
-
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool replied to angelcool's topic in MySQL Help
...well the id in the table was indexed, so look all those timers!! DB is now 1.2GB with 10,000,000 rows! -
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool replied to angelcool's topic in MySQL Help
mysql> create index randomnumbers1 on RandomNumbers(random1); ERROR 1170 (42000): BLOB/TEXT column 'random1' used in key specification without a key length :'( -
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool replied to angelcool's topic in MySQL Help
mysql> explain extended select count(*) from RandomNumbers where random1='XPHACFYG22422DXCCH155RE682AVEEZ2'; +----+-------------+---------------+------+---------------+------+---------+------+---------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+---------------+------+---------------+------+---------+------+---------+-------------+ | 1 | SIMPLE | RandomNumbers | ALL | NULL | NULL | NULL | NULL | 5797265 | Using where | +----+-------------+---------------+------+---------------+------+---------+------+---------+-------------+ 1 row in set, 1 warning (0.07 sec) mysql> What column in the explain indicates the full scan ? -
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool replied to angelcool's topic in MySQL Help
What parameter indicates the full scan you are talking about ? -
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool replied to angelcool's topic in MySQL Help
mysql> select count(*) from RandomNumbers where random1='XPHACFYG22422DXCCH155RE682AVEEZ2'; +----------+ | count(*) | +----------+ | 1 | +----------+ 1 row in set (3.60 sec) ...mm 3.6 secs, it's almost a 6,000,000 rows table tho. OK, I admit it, it's 32 bit CentOS running in VirtualBox; perhaps with dedicated server hardware query time will decrease. -
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool replied to angelcool's topic in MySQL Help
mysql> select count(*) from RandomNumbers; +----------+ | count(*) | +----------+ | 5797265 | +----------+ 1 row in set (0.00 sec) ...how about that. I think is just throughput, that is multiple queries at the same moment. -
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool replied to angelcool's topic in MySQL Help
mysql> explain SELECT * FROM RandomNumbers WHERE random1='XPHACFYG22422DXCCH155RE682AVEEZ2' AND random2='T83WDR36JXYC1LE4U5YPM3LKUM7ZRWSB' AND random3='UKXY3QVCEJF5VJZGFNVSG842L1R4MA58'; +----+-------------+---------------+------+---------------+------+---------+------+---------+-------------+ | id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra | +----+-------------+---------------+------+---------------+------+---------+------+---------+-------------+ | 1 | SIMPLE | RandomNumbers | ALL | NULL | NULL | NULL | NULL | 5797265 | Using where | +----+-------------+---------------+------+---------------+------+---------+------+---------+-------------+ mysql> SELECT * FROM RandomNumbers WHERE random1='XPHACFYG22422DXCCH155RE682AVEEZ2' AND random2='T83WDR36JXYC1LE4U5YPM3LKUM7ZRWSB' AND random3='UKXY3QVCEJF5VJZGFNVSG842L1R4MA58'; +---------+----------------------------------+----------------------------------+----------------------------------+ | id | random1 | random2 | random3 | +---------+----------------------------------+----------------------------------+----------------------------------+ | 5297215 | XPHACFYG22422DXCCH155RE682AVEEZ2 | T83WDR36JXYC1LE4U5YPM3LKUM7ZRWSB | UKXY3QVCEJF5VJZGFNVSG842L1R4MA58 | +---------+----------------------------------+----------------------------------+----------------------------------+ 1 row in set (3.77 sec) ) Table now is 685 MB. -
is 5 seconds for a SELECT query in a 400 MB table reasonable?
angelcool posted a topic in MySQL Help
I have a 400 MB table with 3,500,000 rows; It takes around 5 secs to run a simple SELECT query, does it sound a reasonable time? (... so more or less 15 secs for a 2GB table ) -
...also disable the submit button after users submits form. You will need some js. <input type="submit" value="Submit" disabled>
-
...test, test and test again your code. Only after doing that and obtaining the desire output you will avoid accidental resubmissions, do not forget to recreate the different scenarios the user will be in that may cause an accidental resubmission.
-
BTW, first make sure you can access that log file using the link. Copy and paste it in your browser to find out.
-
Try something like: <?php $log_file= file_get_contents("ftp://username:password@68.232.164.100/czero/68.232.164.100:27015/czero/gsconsole.log"); ?> <textarea name="log_view" cols="110" rows="20" readonly="readonly" wrap="virtual"><?php echo $log_file; ?></textarea> You might have to urlencode your URI.
-
are custom functions available in buffered code?
angelcool replied to angelcool's topic in PHP Coding Help
That's your excuse? It must be okay because the computer doesn't explode when you do it? Using global variables makes it that much easier to 1. Introduce bugs in your script. All of a sudden you can't use certain names for variables. 2. Introduce magic functionality that relies on some special behavior from PHP. The old session 42 bug was like that. 3. Create security holes. If you assume things that aren't true, malicious users can and will use that against you. 4. Write confusing code. Sure, you can read it and understand how it works, but can anybody else? 5. Develop bad coding practices that are completely useless, if even allowed, in other languages. And before you say "I'll always write PHP", open up your mind and think of your career (assuming you want one in web development). ...you should forward all that to PHP team to get rid of the global keyword. -
cookies? I cannot think of anything else. My understanding is that when you close your browser your SESSION ID will be different next time you open your browser, thus you will need to login again, so: 1. Login 2. close browser 3. open browser again 4. log in required if the above behavior is happening, then everything OK. But if your are failing to log in again (step 4 will not log u in) , your code is got ISSUES.