Re: ~Mysql performance~

2006-04-30 Thread Mohammed Abdul Azeem
Hi,

The Server2 is not a slave. Seperate inserts were done on two different
mysql servers.

Thanks,
Abdul.

On Fri, 2006-04-28 at 12:01 -0400, Kishore Jalleda wrote:
 
 
 On 4/28/06, Mohammed Abdul Azeem [EMAIL PROTECTED] wrote: 
 Hi,
 
 I have 2 mysql servers with version 5.0.15-standard-log
 running on
 redhat es4 installed on 2 different geographic locations. The
 default 
 storage engine used is innodb on both the servers. I run an
 insert query
 on both the servers that inserts 25,00,000 records. first
 server takes
 7.5 hrs, while the second server takes around 17 hrs for the
 same
 process.
 
 However the configuration file my.cnf is the same for both the
 machines.
 The first server has a 1GB RAM and a single processor. While
 the second
 server has a 2 GB RAM and it has a dual processor as well. 
 
 If we go by the hardware specs the second server should take
 less time
 as it has a better hardware than the first one. Iam really
 puzzled .
 Can anyone help me out in fixing the issue ?
 
 Thanks,
 Abdul. 
 
 
 
 This email has been Scanned for Viruses!
  www.newbreak.com
 
 
 
 -- 
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/mysql?
 [EMAIL PROTECTED]
 
  
  
 Is the server2 a slave of server1, and is the same insert on server2
 run directly on it or is itpart of a replicated query from server1.
 This came to my mind as u mentioned the two servers are geographically
 seperated ..
  
 Kishore Jalleda 
 http://kjalleda.googlepages.com/projects
  


This email has been Scanned for Viruses!
  www.newbreak.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: ~Mysql performance~

2006-04-30 Thread Mohammed Abdul Azeem
Hi,

The insert queries are run from the localhost on both the machines.

-Abdul

On Fri, 2006-04-28 at 10:28 -0700, Atle Veka wrote:
 On Fri, 28 Apr 2006, Mohammed Abdul Azeem wrote:
 
  Hi,
 
  I have 2 mysql servers with version 5.0.15-standard-log running on
  redhat es4 installed on 2 different geographic locations. The default
  storage engine used is innodb on both the servers. I run an insert query
  on both the servers that inserts 25,00,000 records. first server takes
  7.5 hrs, while the second server takes around 17 hrs for the same
  process.
 
 Are these queries run from localhost or from a remote location? It's very
 unusual for an IDE based system to outperform SCSI.
 
 
 Atle
 -
 Flying Crocodile Inc, Unix Systems Administrator
 
 
 
 This email has been Scanned for Viruses!
   www.newbreak.com


This email has been Scanned for Viruses!
  www.newbreak.com



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



download link to file

2006-04-30 Thread ross
I have a pdfs/documents saved in a field called 'content' on my db and I want 
to create an active hyperlink so users can download. any ideas how I can achive 
this.

I am sure it is simple but cannot find an easy example posted.

thanks,

Ross

Re: download link to file

2006-04-30 Thread Shawn Green
--- [EMAIL PROTECTED] wrote:

 I have a pdfs/documents saved in a field called 'content' on my db
 and I want to create an active hyperlink so users can download. any
 ideas how I can achive this.
 
 I am sure it is simple but cannot find an easy example posted.
 
 thanks,
 
 Ross


Hyperlinks are part of the Hypertext Markup Language (better known as
HTML). HTML messages (better known as web pages) are managed by HTTP
(Hypertext Transfer Protocol) servers. A tool (like a web browser)
sends requests for HTML messages (web pages) by using HTTP to request
them from various kinds daemons (web servers) (pronouced: DAY-mons not
DEE-mons). 

There are several very popular daemons out there, the most often
encountered are Apache (apache.org), and IIS (microsoft.com). Their
responses are generated either by:

a) sending a message explaining why the response failed (an error code)
b) sending the file that was orginally requested, as is.
c) processing some kind of script that generates a message in HTML (or
any of several other standard information formats) that was requested
of the daemon.

With option C, there are a wide range of scripting languages that are
used to generate/process the requested content: PHP, Perl, Python,
Java, Javascript, VBscript, etc.  

What your question sounds like is a request to be shown how to write
some server-side script (at the web server) to convert some data you
have in your database into a message (file) that can be sent in
response to a web browser's request for information (which can be
initiated by the user clicking on a link). And you wanted to know how
to format that link so that it becomes clickable.

Am I close?

Shawn Green
Database Administrator



__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: download link to file

2006-04-30 Thread BenMoreAssynt
[EMAIL PROTECTED] wrote:

 I have a pdfs/documents saved in a field called 'content' on my db and I
 want to create an active hyperlink so users can download. any ideas how I
 can achive this.
 
 I am sure it is simple but cannot find an easy example posted.
 
 thanks,
 
 Ross

Hi Ross,

Answered you in the PHP group, but this is a different query. Here is the
PHP and MySQL I use to do the same thing. I see no reason not to use HTML
to create links to download your pdf files by the way. It keeps things
simple.

You do mean that you keep the filenames in the database, right? 

Feel free to email if you want some explanation, as it seems we are doing
the same thing.

                /*
                 *Construct MySQL query
                 */

   $query = array_pop($queries);
   
                    $select = SELECT files.*;
                    $from = \nFROM files, assoc, words;
                    $where = \nWHERE words.word = ' . $query . ' AND ;
                    $where .= words.id = assoc.word_id \nAND;
                    $where .=  assoc.file_id = files.id ;


                   foreach ($queries as $q)
                   {
                        $from .= ,\nassoc AS assoc_$q, ;
                        $from .=  words AS words_$q;
                        
                        $where .= \n AND words_$q.word = ' . $q . ';
                        $where .= \nAND \nwords_$q.id = assoc_$q.word_id
\nAND ;
                        $where .= assoc_$q.file_id = files.id ;
                       }
                       if ((isset($startdate) and isset($enddate)) or
($startdate !=  and $enddate != ))
                    {
                      $where .=  \nAND \nfiles.startdate = '$enddate'
\nAND ;
                      $where .= files.enddate = '$startdate';
                      }
                      $order = \n ORDER BY files.series, files.volume;     
        
                    /*
                 * connect to database
                 */
                   $conn = mysql_connect($dbhost, $dbuser, $dbpass);
                   if (!$conn)
                   {
                                die(couldn't connect to $dbhost);
                   }
                   if (!mysql_select_db($dbname, $conn))
                   {
                                die(mysql_error($conn));
                   }


        /*
                 construct query
        */
                   $selectq = $select . $from . $where . $order;
                   echo  !--MySQL query: $selectq --\n;
                   $res = mysql_query($selectq, $conn);
                   if (!$res)
                   {
                   die(mysql_error($conn));
                   }

                        /*
                        * Output the results to browser
                        */
                        
/*
* Create HTML table for results
*/
        echo table class=\results\;
        echo
trtdstrongSource/strong/tdtdstrongVolume/strong/tdtdstrongStart
date/strong/tdtdstrongEnd date/strong/td/tr\n;

          while ($line = mysql_fetch_array($res, MYSQL_ASSOC))
                {
                echo trtda
href=\$line[file]\$line[series]/a/tdtd$line[volume]/tdtd$line[startdate]/tdtd$line[enddate]/td/tr\n;
                }

mysql_close($conn);
echo /table;

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]