Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    E-Blah SQL Technical Support    General E-Blah SQL  ›  PostgreSQL
Users Browsing Forum
No Members and 1 Guests

PostgreSQL  This thread currently has 2,062 views. Print
1 Pages 1 Recommend Thread
vol7ron
April 14, 2008, 5:01pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 107
Gender: Male
Posts Per Day: 0.08
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 1 hours 21 minutes
Location: Washington DC
Age: 28
Is anyone interested in getting this to work with PostgreSQL?  I've modified the install files so that it sets up the tables/sequences/indexes, I feel it's on the brink of installing correctly.

There's some sort of connection issue that is a problem when running Blah.pl after install that I'm looking into tomorrow.  I'm doing this so that I can use it for work, but would it benefit anyone else?



Increase vol7ron's Rating
Logged Offline
Private Message Private message
Justin
April 15, 2008, 1:22am Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,196
Gender: Male
Posts Per Day: 4.37
Reputation: 93.25%
Reputation Score: +304 / -22
Time Online: 37 days 19 hours 48 minutes
Location: Tallassee, AL
Age: 25
If you fix it to work well, I'll add it to the next release.


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 1 - 10
vol7ron
April 15, 2008, 7:30am Report to Moderator Report to Moderator
E-Blah Member
Posts: 107
Gender: Male
Posts Per Day: 0.08
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 1 hours 21 minutes
Location: Washington DC
Age: 28
Definitely working on it.  I found a nice little MySQL -> PostgreSQL script from pgFoundry.org  It wasn't the best converter but handled a LOT of the work.

As I said the Tables/Sequences/Indexes were created correctly, which was half the install.  The point I'm at right now is figuring out an error on the final install page, which is blank.  There's no line number, no error code, just an error box.  Then there's a connection problem when continuing on.  I feel these are related and should be an easy fix, once found.  The problem is probably with the pg.pm file I created (copied from mysql.pm).

I hope I have the time to finish looking at this because it would be very useful at work.  We're using tWiki at the moment (a wiki built with perl for linux), which is great for documentation and procedures, but a discussion board would be nice for question & answers as well as a collaborative place for project ideas.



Increase vol7ron's Rating
Logged Offline
Private Message Private message Reply: 2 - 10
vol7ron
April 15, 2008, 4:27pm Report to Moderator Report to Moderator
E-Blah Member
Posts: 107
Gender: Male
Posts Per Day: 0.08
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 1 hours 21 minutes
Location: Washington DC
Age: 28
I almost have it working for me. --- It installs fine and the tables populate, but now there's a problem logging in and registering users.  

The last problem was in the INSERT INTO and UPDATE query syntax.  
I was not as familiar with PostgreSQL syntax differences, especially when jumping from SAS to Access to SQL Server to Oracle to MySQL to DB2 and now back to this.  But this was good learning experience.

I'll try to figure out what's up with the log in, but if you have any suggestions on how it works, it might save me time instead of diving into the code.

------------------

Edit:
I might have fixed that, now the problem is that whenever I click a new page, the active user list is duplicated.  It's I click on a category I'm listed in active users twice.

Argh these problems never cease to stop and to think it'd be a quick fix because most of the code is the same.

------------------

Nevermind to this too... just another problem with the WHERE syntax as part of the DELETE query.  I think we're almost there.  I'll post again when there's an issue I would prefer some help to solve



Increase vol7ron's Rating

Revision History (3 edits)
vol7ron  -  April 15, 2008, 6:01pm
vol7ron  -  April 15, 2008, 5:33pm
vol7ron  -  April 15, 2008, 4:48pm
Logged Offline
Private Message Private message Reply: 3 - 10
vol7ron
November 14, 2008, 8:17am Report to Moderator Report to Moderator
E-Blah Member
Posts: 107
Gender: Male
Posts Per Day: 0.08
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 1 hours 21 minutes
Location: Washington DC
Age: 28
Been a while since i've messed with this, and i saw that there was another SQL release, so I think it affects a lot of my changes.

I think what I'll do is wait til my server host installs PostgreSQL (they're having troubles with it).  Once that happens, I'll be able to have a copy I can work on at work as well as at home.  I think this will benefit my section's intranet site.

Anyhow, until next time...



Increase vol7ron's Rating
Logged Offline
Private Message Private message Reply: 4 - 10
iCONICA
November 14, 2008, 10:18am Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,431
Gender: Male
Posts Per Day: 0.96
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 16 days 2 hours 20 minutes
Location: Manchester UK
Vol7ron, why is it you want eblah to support postgre? what is it your looking for that mysql doen't provide?
I'm no expert on SQL but from what i've researched there are a few features postgre has that mysql doesn't yet mysql seems to be faster?

Thanks.  


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 5 - 10
vol7ron
February 15, 2009, 9:32am Report to Moderator Report to Moderator
E-Blah Member
Posts: 107
Gender: Male
Posts Per Day: 0.08
Reputation: 100.00%
Reputation Score: +9 / -0
Time Online: 1 days 1 hours 21 minutes
Location: Washington DC
Age: 28
PostgreSQL is the more robust and faster database.  The difference between the two for small scale applications may be interchangeable.  At times MySQL might be faster, at other times PostgreSQL.  Unfortunately, once you have more and more records, PostgreSQL is the thing to use.  Not only is it faster, but easier to manage and has, in my opinion more security and other useful features.

MySQL has it's pluses over PgSQL, but in then end PgSQL is the open source alternative to SQL Server (one of the high end databases).  I have worked with DB2, Oracle, SQL Server, MySQL, and PostgreSQL, please just trust that I know a little about what I'm talking about.

If you still need a little more encouragement here are some other reasons:
1) Free hosts typically install one or the other, when it comes to databases.  If you're using a free host with PostgreSQL, what good is a MySQL forum?  --- this is also to say you don't want a flat file forum
2) It's generally good practice to keep all your data managed by one database management system (dbms), unless another system is better at managing it.  So if you're using PgSQL for everything else, why not eBlah?
3) PostgreSQL 8.3+ has full text search capability, with algorithms that are really good (Google good) at searching your website (and forum) and returning hits; this is something MySQL doesn't provide
4) PgSQL is good at maintenance, and performance handling
5) PgSQL has an extended list of programming languages you can use when working with the Pl/SQL for stored structures and queries - C/Perl/Java/PHP/etc

But these are only a few I've taken off the top of my head, I suppose you may find more meaningful lists if you go compare the two.


-------------------------

On a plus note, my free host has finally set up PgSQL, so I can resume testing.  I stopped having time to fiddle with this at work (even though I almost had it complete).  I fear I'm going to have to start from scratch again, since a newer version probably has come out since.  I did take notes on my changes though



Increase vol7ron's Rating
Logged Offline
Private Message Private message Reply: 6 - 10
iCONICA
February 15, 2009, 2:48pm Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,431
Gender: Male
Posts Per Day: 0.96
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 16 days 2 hours 20 minutes
Location: Manchester UK
Oohh interesting...

Which would you say would be better for a database with 50,000+ entries in a table? I'm using MySQL for one of my sites and it's quite slow, uses massive amounts of CPU time and taking random data from the table is slow too...
Maybe postgreSQL would be better?  


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 7 - 10
Justin
February 20, 2009, 7:19pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,196
Gender: Male
Posts Per Day: 4.37
Reputation: 93.25%
Reputation Score: +304 / -22
Time Online: 37 days 19 hours 48 minutes
Location: Tallassee, AL
Age: 25
Quoted from iCONICA
Oohh interesting...

Which would you say would be better for a database with 50,000+ entries in a table? I'm using MySQL for one of my sites and it's quite slow, uses massive amounts of CPU time and taking random data from the table is slow too...
Maybe postgreSQL would be better?  


If it's slow with that many records, you either don't have an index correct on the data you're getting out (do an EXPLAIN on the SELECT statement) or MySQL isn't configured correctly for your server.

At work, we have a 3 million row table that is quite speedy for the number of rows it contains.  You have to make certain your index's are correct on it though, or it could take a long, LONG time to run.

E-Blah SQL uses very simple SQL statements and SHOULD be able to be transported to just about any other SQL database server out there, with a few tweaks to the table creation.  I'm not sure how many indexes I put, but I'm sure there needs to be more.  


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 8 - 10
iCONICA
February 20, 2009, 7:30pm Report to Moderator Report to Moderator

Forum Moderation
Posts: 1,431
Gender: Male
Posts Per Day: 0.96
Reputation: 98.25%
Reputation Score: +56 / -1
Time Online: 16 days 2 hours 20 minutes
Location: Manchester UK
wow thanks for the info.

It's REALLY slow. I mean, taking 8+ seconds at 100% CPU load on a 3GHz duel core server to get the data for one page.

I don't think it's down to the installation. I have tried the same database on my home server, (the database is usually on my host's servers), my home server runs fedora 10 and I even installed mysql on this much more powerful Vista PC and got the same slow result. mysql.exe hitting 100%.

I think there is either a problem with the database, some missing info like an index (can i rebuild this?) or maybe the software that created the database has inefficiencies. I'm using plogger, and there are many sql experts on their forums which i'm sure would have noticed and fixed any issues this big by now...

So I'm guessing it's a problem with my actual database... As plogger has no option to rebuild the database, and i've already done a repair and optimize from phpmyadmin, is there anything else I can do?  


Logged Offline
Site Site Private Message Private message Windows Live Messenger WLM Reply: 9 - 10
Justin
March 9, 2009, 10:09pm Report to Moderator Report to Moderator

The E-Blah Developer
E-Blah Programmer
Posts: 15,196
Gender: Male
Posts Per Day: 4.37
Reputation: 93.25%
Reputation Score: +304 / -22
Time Online: 37 days 19 hours 48 minutes
Location: Tallassee, AL
Age: 25
Do an EXPLAIN on the SQL statement (EXPLAIN SELECT ...).  It'll tell you how it's finding the data.  If it's not using an index, that's your problem.  One of the biggest issues you'll have is MySQL will use filesort. Look at the last column of the explain, if any of the tables has filesort you probably either don't have an index in the right place.  Now that I said that, it doesn't mean that's always the problem since sometimes it can be from sub-queries or badly planned JOINs, among other things.


I do installs for $25 and upgrades for $20.
Technical support is always free.

  Donate to E-Blah!  

My Websites: Revolution Reality (My Blog)  | Portfolio

"But you, O Lord, are a compassionate and gracious God, slow to anger, abounding in love and faithfulness." — Psalm 86:15 NIV
Logged Offline
Site Site Private Message Private message Reply: 10 - 10
1 Pages 1 Recommend Thread
Print