Posts Tagged ‘short time’

Saint new Martyr John the Bulgarian feast day on his martyrdom that was on 5 March 1784

Sunday, March 5th, 2023

Saint_John-the-Bulgarian-new-martyr-5-march-year-1784

 

Life of St. Martyr John the Bulgarian – born circa year 1763 martyred 5 of March, 1784

Blessed John was a native of Bulgarian and as such he has been by inheritance an Orthodox Christian in the 18 century, where still Bulgaria was under the Ottoman Turks Slavery in which time being an Orthodox Christian was taugh as often Turks did they best to convert every Christian they can to the truthful in their opinion Islamic faith. Under the atmosphere of many great hardship for Christians.
By some chance he succumbed to the devil's wiles and denied Christ.

But after some time he realized his great transgression, feeling he fall badly from Grace and began to repent of his denial of the Christian faith.

In this state of mind, seeking to calm his conscience (internal voice of the soul who was talking in him that he did a huge wrong against the love of the Good Christ, he left his birthplace and came to Mount Athos, looking for help to heal his great soul wound.

Here John served, a spiritual elder for three years for the sake to receive a great help for his soul and receive forgiveness for his deniel of Christ. But because his conscience still troubled him, 
he was always depressed, sad, and silent and couldn't find peace with himself.

His very appearance indicated from far sight that he had suffered some great accident or badness in his life which doesn't give him any moment of peace and does not give him to living just like every ordinary person did.

As he could no longer bear the pangs of conscience of the internal man, John left Holy Mount Athos, came to Constantinople (Istanbul), dressed as a turk and in this guise entered the "Hagia Sophia (Wisdom of God)" mosque, which for many years has been the greatest symbol of Orthodox Christianity until the fall of Constantinople under Turks on May 29 1451.

There he began to cross himself with the Sign of the Cross, the Orthodox Christians does and to pray in a Christian way, which greatly smite the Agarians.

Enraged, they attacked him harshly and asked him why he was doing this? 


In a responce, he fearlessly confessed that he was a Christian, and that is why he Crossed himself as a Christian and worshiped Christ Only, who is the Son of God and true God!

Sveti_Ioan-Bylgarin-saint-John-the-Bulgarian-Ottoman-Empire-New-Martyr-for-Christ

The Hagarenes tried to divert him from his firm Creed of Faith (to save his earthly life) – as it was the common norm that "anyone who did such a shameful to muslims deed was worthy for dead", but when they tried hard to make him denounce his deed, pardon himself for his "unrighteous deed against the prophet Mohammed" and the Islamic faith but failed and were completely convinced that John was adamant and will not renounce his beliefs neither sorry for his embarassment, they immediately cut off his head outside in the courtyard of Hagia Sophia.

This happened on March 5, 1784. Thus, blessed John received a bright martyr's crown from Christ God at the age of 19 (and according to other biographical sources when he was just 18 years old).

Living Source © Lives of the Saints. Synodal Publishing House, Sofia, 1991
 

Living of St. John the Bulgarian (from the Greek Neon Martirologon)

Blessed John was a native from Bulgaria, young in age, about 18 years old, handsome in face, and literate.

On some occasion that befell him, he renounced – alas! from Christ.

But then, after a short time, he became aware of the evil he had done, repented and, leaving his birthplace, came to Holy Mount Athos monk republic and stayed in the great Lavra of St. Athanasius (founded in year 963 AD), where he ministered to a crippled spiritual elder and along dedicating his time to reading the holy books.

But because his conscience was gnawing o him because, the denial of Christ committed, he always walked dark, sorrowful and silent, so that by his sad appearance he showed everyone that he had experienced some great misfortune.

So, one day, under the pretext of going to his native place, he set out and went to Constantinople, where he put a Turkish distingushing muslim uniform that every muslim wear the red hat (fez) on his head and put on red shoes on his feet, and in this guise entered the mosque of Hagia Sophia (that was then a mosque but earlier the most glorious Christian temple who Saint Constantine has built and a symbol to the world for Christian). There he began to be crossing his shoulders with the sign of the cross and perform Christian worship.

When the Agareans saw him, they were indignant and fell upon him and sternly asked him why he was doing this?

And he, fearlessly confessed that he was a Christian and as a Christian he depicts the sign of Salvation his Life giving Cross and worships Jesus Christ, who is the Son of God and God.

The Agareans tried in various ways to convert him to islam, but found no way.

Finally, seeing the steadfastness of his conviction, they beheaded him outside the courtyard of the aforementioned mosque, and in this way, on March 5, 1784, the saint received the crown of martyrdom from Christ our God, Who deserves glory and power throughout the ages!

Amen!

Living Source: From "Neon Martirologon", a translation from the Greek epic. Parthenius

A quick and easy way to install Social Network on Linux/BSD System with Elgg

Monday, March 14th, 2011

elgg-blue-logo
I'm experimenting this days with Elgg – An Open Source Free Software GPLed Social Network which enables users to quickly create Communities.

Elgg is really easy to install and all it requires is a Linux/BSD or Windows system with PHP, MySQL and Apache installed.

Elgg is provided with dozens of nice plugins which for a short time enables individual to create fully operational Social Network like facebook.

Many people nowdays use facebook without realizing how bad facebook is how it breaks their privacy.
Facebook is actually a spy network, it stores data and pictures, likings and user behaviour of million of users around the world.
This needs to be stopped somehow, maybe if people start using the free software networks like elgg to build a mini-community which has profound interests in a certain spheres of work, life and amusement.
The evil empire of facebook will slowly start to loose it's position and the small projects networks based on Elgg and the other Free Software Social Networks which are currently available will start to rise up.
I'm currently really a novice into Elgg but I'm more convinced that the guys who develop it and contribute to it in terms of handy plugins have done really a great job.

It's ultra easy even for non professional middle level user to setup himself an Elgg install.
The installation procedure is not much harder than a simple wordpress blog or joomla based website install.
The installation of elgg takes no more than 10 to 20 minutes, the plugin installation and setup time further could take few days but in the end you have a full featured Social Network! This is really amazing.
The installation of new plugins in elgg is also fool proof / easy all you have to do to equip a newly installed elgg with plugins is to go to it's root directory and look for the mod directory. The new plugins which needs to be installed, could be directly downloaded and saved via links, elinks, lynx or even wget to the elgg installation directory.

Most of the elgg plugins comes in a form of zip files so after being installed simply executing:

server:/home/elgg/mysocialnetwork/mod# unzip walltowall.zip
....

The above cmd will for example unzip the WallToWall elgg plugin and the plugin will be further ready to be enabled via the administrator user set upped during your elgg installation.

The configurations of elgg are being accomplished via:

Administration -> Tool Administration

I should I'm still experimenting with Elgg social, until this very moment I've installed the following elgg plugins:

aaudio
akismet
artfolio
blog
bookmarks
buddytalk
captcha
categories
chat
crontrigger
custom_index
custom_profile_fields
default_widgets
diagnostics
elgg-ebuddy
embed
embedvideo
emoticons
externalpages
family
fbconnect
file
file_tree
flyers
forum
friend_request
friends
garbagecollector
groups
htmlawed
invitations
invitefriends
izap_videos
kaltura_video
lastfm
likes
logbrowser
logrotate
lucygames
members
messageboard
messages
milockergames_frameme
noscript_message
notifications
pages
polls
profile
reportedcontent
resume
river_comments
riverdashboard
riverfaces
search
siteaccess
tagcloud
theme_simpleneutral
thewire
tidypics
tidypicsExt
tinymce
twitter
twitterservice
user_contact_list
uservalidationbyemail
walltowall
weather
wp1
zaudio

One very handy feature I truly enjoy about Elgg is that it gives every user an own blog which or in other words when somebody registers in Elgg, he automatically gets a personal blog! How cool this is Yeash 😉
The Elgg photo upload plugin is also another interesting story. The photo plugin is a way better from my first impressions than facebook's buggy upload client.
Elgg also uses heavily jquery for it's various operations and the user experience feels very interactive.

Of course as with all free software things are not perfect some of the elgg plugins or (mods) as they are called are not working.
For example I couldn't make by so far the weather plugin which is supposed to report the weather.

Maybe some tweakening of the not working plugins will easily make them working. What is really important is that the Elgg basis system looks and seems to work really good and enpowers the user with a social network alternatives to the ugly facebook.

In order to experiment with Elgg and I've established a small social network targetting at University College and School Students called MockATeacher – mockateacher.com>/i>. The idea behind is to help students in their report writting by providing them with a place where they can meet other students and share files.

Some other aspects I've planned for MockATeacher is to build a small community of people who would like to share about idiot teachers, teacher stupid sayings as well as to mock the idiotic type of education that we and our children are up to in this age.
Just to close up, if you're looking for some time to spend in experimenting in an enjoyable way you definitely need to install elgg and play with it 😉

History of Belarus in 5 minutes – Learn a lot for Belarus in short time

Tuesday, October 30th, 2012

I've been recently interested in Belarusian History. I found few very interesting videos in youtube, so decided with people who want to learn more about Slavonic Culture. Belarus is a Slavonic culture and old Belarusian language dates back to Ancient Bulgarian traditions. Also Belarusian Ancient language includes a lot of Slavonic Ancient Bulgarian words. As a Bulgarian it is very interesting to me too the severe impact that our Great Bulgarian nation had on Slavonic Nations and Russians. Belarusians both lingually and culturely are very close to us Bulgarian. Orthodox Christian faith which later spread in Belarusian lands, has also been transferred from Bulgarian and Serbian lands to Belarus. After the pupils of Saint Cyril and Methodius, spread Slavonic alphabet in nowdays Romanian lands, Moldova and Belarus.
The first below video Belarus History in 5 minutes has a genuine video and musical arrangment. It was quite interesting to me, find out Belarussian people had a long known tradition in Musical Instruments and Folklore Music. Nowdays they produce also a great Gothic Music, just like most of celtic nations 🙂

History of Bulgarus in 5 minutes – Aristic short presentation lesson on Belarussian history


0:02
At first, there was nothing

 

0:03
now there’s a lot of everything

 

0:04
we have to thank God for that

 

0:06
He created our world in the freestyle genre

 

0:09
He said, "Budzma" (“So be it!”)

 

0:10
and Our Land appeared.

 

0:11
Ichthyosauri and other dragons…

 

0:13
in the beginning, we lived in the ocean

 

0:15
but then we left the bosom of the sea

 

0:17
and started to be called the Neuri.

 

0:19
From the earliest times

 

0:21
the Neuri could turn into wolves

 

0:23
that was a customary thing for them…

 

0:26
Žycien, Piarun, Dažboh, and Svaroh

 

0:28
our ancestors believed in heathen gods

 

0:30
but Christianity already knocked on the door.

 

0:34
Let’s know our roots! The Belarusians, the daring people!

 

0:38
In the year 862 of our era

 

0:41
the city of Polacak was mentioned for the first time

 

0:43
There, St. Safija Cathedral was build

 

0:45
(there’re only three such churches in the world)

 

0:47
Local Prince Usiaslau Caradziej

 

0:49
was a cool personage; Listen what I say!

 

0:51
St. Jefrasinnia lived in Polacak

 

0:53
the memory of her is cherished down the ages

 

0:56
The famous cross was made for her

 

0:58
(it wasn’t just super, it was marvelous)

 

1:00
but during WWII, it was lost

 

1:02
and now it’s our own grail

 

1:04
Let’s continue, let’s march ahead

 

1:07
The time of Grand Prince Mindouh came

 

1:09
and here we must remember that

 

1:11
Belarus was called Litva then

 

1:13
or rather – the Grand Principality of Litva

 

1:15
its coat of arms was Pahonia (pursuit)

 

1:16
it had a formidable army

 

1:17
Our capital Vilnia was founded by

 

1:19
Grand Prince Hiedymin

 

1:21
the legend says he had a dream about an iron wolf…

 

1:24
Wikipedia describes this event

 

1:26
Let’s know our roots!

 

1:28
The Belarusians, the daring people!

 

1:31
The year 1362

 

1:34
The sword is drawn; flags flutter in the wind…

 

1:36
In the Battle of Blue Waters

 

1:38
our army defeated three Khans of the Golden Horde

 

1:41
and the Grand Principality of Litva suddenly

 

1:43
became the largest country in Europe

 

1:45
Let’s continue, let’s march ahead.

 

1:47
Vitaut reigns in the Grand Principality

 

1:49
The Teutonic Order threatens us.

 

1:51
The Battle of Grunwald shows who’s right

 

1:53
Vitaut and Jahajla, King of Poland

 

1:55
junked the Crusaders like scrap metal

 

2:00
Francysk Skaryna was a tough guy

 

2:02
he went to study abroad

 

2:04
He was the first who printed the Bible

 

2:06
in the Old Belarusian language in Prague

 

2:08
Our warriors were tough men, too

 

2:11
they defeated the Moscow Army near Vorsa

 

2:13
in the year 1514

 

2:17
In the meantime, the Grand Principality of Litva

 

2:19
accepted its constitution – the Statute of the GPL 1588

 

2:21
In the Battle of Kircholm, we defeated the Swedish army

 

2:24
Apparently, you didn’t know this fact before.

 

2:26
Let’s know our roots!

 

2:28
In the city of Mahilou

 

2:30
7,000 invaders were killed in the fight

 

2:32
Who were these invaders? Well, these … from the East

 

2:34
representatives of the "brotherly" Russian nation

 

2:37
They were called Muscovites then.

 

2:38
And there’s already a new state

 

2:40
the Polish–Litvian Commonwealth

 

2:43
For some reason, it irritated all the neighbors

 

2:45
The three partitions of this Commonwealth

 

2:47
and we were divided between three states

 

2:49
The biggest part was occupied by Russia

 

2:51
It engendered discontent among the nobility

 

2:53
and Tadevus Kasciuska appears on the scene

 

2:56
It’s necessary to remember this name because

 

2:58
he was a great revolutionary

 

3:00
for liberty, equality and fraternity

 

3:02
he struggled even in the United States

 

3:04
but the Russian Tsar cast him into prison

 

3:06
Let’s know our roots!

 

3:10
During Napoleon’s war

 

3:13
the Belarusians fought with the Belarusians

 

3:15
and in 1863 there was a new rebellion

 

3:20
Kastus Kalinouski, a patriot of Belarus

 

3:24
and his peasant soldiers – "kasiniery"

 

3:25
struggled for independence

 

3:26
but he was caught and hanged in Vilnia

 

3:30
The world enters the 20th century

 

3:32
It’s necessary to revive our culture!

 

3:34
Bahusevic, Bahdanovic, Kupala and Kolas

 

3:36
Lastouski, Luckievic… Many people!

 

3:39
Dozens and dozens of outstanding names…

 

3:41
but the Red Revolution is approaching fast

 

3:45
Well, in the terror of the Revolution

 

3:47
a new state with a beautiful name was born

 

3:49
the Belarusian People’s Republic

 

3:51
We still celebrate the day it was proclaimed

 

3:54
But suddenly, out of the blue

 

3:56
another Republic was installed here

 

3:58
its name wasn’t romantic at all

 

4:00
Belarusian Soviet Socialist Republic.

 

4:02
The 1920s. We remember that time

 

4:04
Belarusianization is everywhere

 

4:06
Writers publish their excellent works

 

4:09
Viciebsk artists create their chefs-d’oeuvre…

 

4:11
This process was stopped

 

4:12
in the year 1937

 

4:14
the blood purge began.

 

4:15
After that, one more hell – WWII

 

4:20
There were invaders, there were partisans

 

4:21
the country was torn apart again…

 

4:24
The Belarusians fought with the Belarusians again

 

4:26
shedding each other’s blood

 

4:30
The war is over! No need to fight!

 

4:32
There’re cosmonauts flying in the sky

 

4:34
Maserau, it’s time for you to speak!

 

4:36
Piesniary, it’s time for you to sing!

 

4:39
Barys Kit, make your discoveries for NASA

 

4:41
and we keep living in our country

 

4:43
which name now is the Republic of Belarus

 

4:45
We’ve got our ensign and national emblem

 

4:47
we sing our songs and read our poems…

 

4:50
the year 1991…

 

4:51
Let’s know our roots!

 

4:54
The Belarusians, the daring people!

 

4:56
We stop here, but now it’s your time

 

4:58
All of you can write your own continuation…

 

5:00
Let’s know our roots!

 

5:02
The Belarusians, the daring people!

 

5:04
Let’s know our roots!

 

5:06
The Belarusians, the daring people!

 

5:09
Budzma viedac svoj rod!

 

5:11
Salony narod, Bielaruski narod!

 

History of Belarus Гісторыя Беларусі Historia Białorusi _ – 8 minutes video explaining in short Belarusian etymological roots

Ancient Musical Instruments of Belarus

Most importantly, nowdays Belarus still hold the light of Orthodox Christian faith, just like us Bulgarians. Spiritually Bulgaria and Belarus is united in our Orthodox Christian faith. This summer, I had the blessing many Belarusians in Pomorie Monastery (An Orthodox monastery located in the Black Sea sea coast (near Burgas) in Bulgaria). I've been amazed by the faith and spirituality Belarusians still hold even in this "dark times" of Christian faith decay and increased ungodliness.

History of Belarus (A 10 minutes short History of

WordPress Plugins to monitor and debug WP enabled plugins – Find Errors / Warnings and Remove WP problematic plugins slowing down your Website (blog) database

Thursday, February 19th, 2015

plugins-to-monitor-debug-wordpress-enabled-plugins-how-to-track-find-errors-and-warnings-and-remove-problematic-wp-extensions-that-slow-down-your-website

Recent days, I'm spending a lot of time again trying to optimize my wordpress blog. Optimizing WP for better efficiency is becoming harder and harder task day by day as the website file content data is growing along with SQL databases. Moreover situation gets even worse because the number of plugins enabled on my blog is incrementally growing with time because, there is more and more goodies I'd like to add.
Optimizing WordPress to run for Speed on a server is a whole a lot of art and its a small universe in itself, because as of time of writting this post the count (number) of WordPress available PLUGINS is 36,197 ! 

1. Manually Tracking WordPress  Plugins causing Slow SQL Queries (MySQL bottleneck) issues directly using console / SSH

Because of its open source development and its nice modular design wordpress has turned into a standard for building small, middle sized and large websites (some WordPress based blogs and sites have from 50 000 to 100 000 unique pages!). My blog is still a small WordPress site with only 1676 posts, so I still haven't reached the high volume traffic optimization requirements but still even though I have a relatively good server hardware  8GB RAM / (2×2.70 Ghz Intel CPU) / 500 GB (7400 RPM HDD) at times I see Apache Webservers is unable to properly serve coming requests because of MySQL database (LEFT JOIN) requests being slow to serve (taking up to few seconds to complete) and creating a MySQL table lock, putting all the rest SQL queries to stay in a long unserved queues line, I've realized about this performance issue by using a a mysql cli (command) client and few commands and console command (tool) called mytop (also known as mtop). MyTop refreshes every 3 seconds, so the slow query will immediately stay on screen to view moer info about it press "f" and type the  in query ID.

mysql-top-running-on-gnu-linux-server-tracking-sql-queries-in-console-screenshot.png

mysql-top-running-on-gnu-linux-server-tracking-sql-queries-in-console-screenshot2

Finally it is very useful to run  for a while MySQL server logging to /var/log/mysql/slow-query.log:
Slow query is enabled (on my Debian 7 Wheezy host) by adding to /etc/mysql/my.cnf
after conf section

 

vim /etc/mysql/my.cnf
#
# * Logging and Replication
#
# Both location gets rotated by the cronjob.
# Be aware that this log type is a performance killer.
# As of 5.1 you can enable the log at runtime!
#general_log_file        = /var/log/mysql/mysql.log
#general_log             = 1
#
# Error logging goes to syslog due to /etc/mysql/conf.d/mysqld_safe_syslog.cnf.
#
# Here you can see queries with especially long duration

 

Paste:

 

slow_query_log = 1
slow_query_log_file = /var/log/mysql/slow-query.log
long_query_time = 2
log-queries-not-using-indexes

 

And then to make new mysql configuration load restarted mysql server:

 

debian-server:~# /etc/init.d/mysql restart
Stopping MySQL database server: mysqld.
Starting MySQL database server: mysqld ..
Checking for tables which need an upgrade, are corrupt or were
not closed cleanly..

 

Leaving mysql-slow.log to be enabled for 30 minutes to an 1 hrs is a good time to track most problematic slow queries and based on this queries, I took parts of  SQL UPDATE / SELECT / INSERT etc. Db queries which was problematic and grepped throughout /var/www/blog/wp-content/plugin files in order to determine which WordPress Plugin is triggering the slow query, causing blog to hang when too many clients try to see it in browser.

My main problematic SQL query having long execution time  (about 2 to 3 seconds!!!) most commonly occuring in slow-query.log was:

 

SELECT DISTINCT post_title, ID, post_type, post_name FROM wp_posts wposts LEFT JOIN wp_postmeta wpostmeta ON wposts.ID = wpostmeta.post_id LEFT JOIN wp_term_relationships ON (wposts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_taxonomy ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id) WHERE (post_type='page' OR (wp_term_taxonomy.taxonomy = 'category' AND wp_term_taxonomy.term_id IN(11))) AND post_status = 'publish' AND LENGTH(post_title)>=5 ORDER BY LENGTH(post_title) ASC LIMIT 500

Because above query uses SQL Column names and Tables which are not hard coded in PHP code, to find out which plugins is most probably to launch this complex LEFT JOIN query, I used a quick bash one-liner:

 

# cd /var/www/blog/wp-content/plugins

 

# for i in $(grep -rli 'SELECT DISTINCT' *); do grep -rli 'LEFT JOIN' $i; done 
./seo-automatic-links/seo-links.php
./wp-postviews/wp-postviews.php
./yet-another-related-posts-plugin/classes/YARPP_Cache_Tables.php

 

I wanted to put less load on CPU during grep so looked for string only in .PHP extensioned files with:

 

 # for i in $(find . -iname '*.php' -exec grep -rli 'SELECT DISTINCT' '{}' \;); do grep -rli 'LEFT JOIN' $i; done
./seo-automatic-links/seo-links.php
./wp-postviews/wp-postviews.php
./yet-another-related-posts-plugin/classes/YARPP_Cache_Tables.php


As you can see the complex query is being called from PHP file belonging to one of 3 plugins

  • SEO Automatic Links – this is SEO Smart Links WP plugin (Does internal bliog interlinking in order to boast SEA)
  • WP PostViews – WordPress Post Views plugin (Which allows me to show how many times an article was read in WP Widget menu)
  • Yet Another Related Posts – Which is WP plugin I installed / enabled to show Related posts down on each blog post


2. Basic way to optimize MySQL slow queries (EXPLAIN / SHOW CREATE TABLE)

Now as I have a basic clue on plugins locking my Database, I disabled them one by one while keeping enabled mysql slow query log and viewing queries in mytop and I figure out that actually all of the plugins were causing a short time overheat (lock) on server Database because of LEFT JOINs. Though I really like what this plugins are doing, as they boast SEO and attract prefer to disable them for now and have my blog all the time responsible light fast instead of having a little bit better Search Engine Optimization (Ranking) and loosing many of my visitors because they're annoyed to wait until my articles open

Before disabling I tried to optimize the queries using MySQL EXPLAIN command + SHOW CREATE TABLE (2 commands often used to debug slow SQL queries and find out whether a Column needs to have added INDEX-ing to boast MySQL query).

Just in case if you decide to give them a try here is example on how they're used to debug problematic SQL query:
 

  1. mysql> explain SELECT DISTINCT post_title, ID, post_type, post_name
  2.     -> FROM wp_posts wposts LEFT JOIN wp_postmeta wpostmeta
  3.     -> ON wposts.ID = wpostmeta.post_id LEFT JOIN wp_term_relationships
  4.     -> ON (wposts.ID = wp_term_relationships.object_id) LEFT JOIN wp_term_taxonomy
  5.     -> ON (wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id)
  6.     -> WHERE (post_type='page'
  7.     -> OR (wp_term_taxonomy.taxonomy = 'category'
  8.     -> AND wp_term_taxonomy.term_id IN(11,15,17)))
  9.     -> AND post_status = 'publish'
  10.     -> AND LENGTH(post_title)>=5
  11.     -> ORDER BY LENGTH(post_title) ASC
  12.     -> LIMIT 500;
  13. +—-+————-+———————–+——–+——————+———+———+———————————————+——+———————————————-+
  14. | id | select_type | table                 | type   | possible_keys    | key     | key_len | ref                                         | rows | Extra                                        |
  15. +—-+————-+———————–+——–+——————+———+———+———————————————+——+———————————————-+
  16. |  1 | SIMPLE      | wposts                | ALL    | type_status_date | NULL    | NULL    | NULL                                        | 1715 | Using where; Using temporary; Using filesort |
  17. |  1 | SIMPLE      | wpostmeta             | ref    | post_id          | post_id | 8       | blog.wposts.ID                              |   11 | Using index; Distinct                        |
  18. |  1 | SIMPLE      | wp_term_relationships | ref    | PRIMARY          | PRIMARY | 8       | blog.wposts.ID                              |   19 | Using index; Distinct                        |
  19. |  1 | SIMPLE      | wp_term_taxonomy      | eq_ref | PRIMARY          | PRIMARY | 8       | blog.wp_term_relationships.term_taxonomy_id |    1 | Using where; Distinct                        |
  20. +—-+————-+———————–+——–+——————+———+———+———————————————+——+———————————————-+
  21. 4 rows in set (0.02 sec)
  22.  
  23. mysql>
  24.  

     

     

  1. mysql> show create table wp_posts;
  2. +———-+————————–+
  3. | Table    | Create Table                                                                                                                                                                                                                                                                                                                                                                                                                                 |
  4. +———-+————————–+
  5. | wp_posts | CREATE TABLE `wp_posts` (
  6.   `ID` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  7.   `post_author` bigint(20) unsigned NOT NULL DEFAULT '0',
  8.   `post_date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  9.   `post_date_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  10.   `post_content` longtext NOT NULL,
  11.   `post_title` text NOT NULL,
  12.   `post_excerpt` text NOT NULL,
  13.   `post_status` varchar(20) NOT NULL DEFAULT 'publish',
  14.   `comment_status` varchar(20) NOT NULL DEFAULT 'open',
  15.   `ping_status` varchar(20) NOT NULL DEFAULT 'open',
  16.   `post_password` varchar(20) NOT NULL DEFAULT '',
  17.   `post_name` varchar(200) NOT NULL DEFAULT '',
  18.   `to_ping` text NOT NULL,
  19.   `pinged` text NOT NULL,
  20.   `post_modified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  21.   `post_modified_gmt` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  22.   `post_content_filtered` longtext NOT NULL,
  23.   `post_parent` bigint(20) unsigned NOT NULL DEFAULT '0',
  24.   `guid` varchar(255) NOT NULL DEFAULT '',
  25.   `menu_order` int(11) NOT NULL DEFAULT '0',
  26.   `post_type` varchar(20) NOT NULL DEFAULT 'post',
  27.   `post_mime_type` varchar(100) NOT NULL DEFAULT '',
  28.   `comment_count` bigint(20) NOT NULL DEFAULT '0',
  29.   PRIMARY KEY (`ID`),
  30.   KEY `post_name` (`post_name`),
  31.   KEY `type_status_date` (`post_type`,`post_status`,`post_date`,`ID`),
  32.   KEY `post_parent` (`post_parent`),
  33.   KEY `post_author` (`post_author`),
  34.   FULLTEXT KEY `post_related` (`post_title`,`post_content`)
  35. ) ENGINE=MyISAM AUTO_INCREMENT=12033 DEFAULT CHARSET=utf8 |
  36. +———-+———————-+
  37. 1 row in set (0.00 sec)
  38.  
  39. mysql>
  40.  


By the way above output is a paste from the the new PasteBin Open Source (Stikked powered) service I started on www.pc-freak.net – paste.www.pc-freak.net (p.www.pc-freak.net) 🙂

Before I took final decision to disable slow WP plugins, I've experimented a bit trying to add INDEX to Table Column (wposts) in hope that this would speed up SQL queries with:

 

mysql> ALTER TABLE TABLE_NAME ADD INDEX (wposts);

 

But this didn't improve query speed even on the contrary it make execution time worse.

3. Tracking WordPress Plugin PHP Code Execution time and Plugins causing Slow SQL Queries (MySQL bottleneck) issues through WP itself

Well fine, I'm running my own hosted Blog and WordPress sites, but for people who have wordpress sites on shared hosting, there is usually no SSH (Terminal) Access to server, those people will be happy to hear there are 2 Free easy installable WordPress plugins which can be used to Debug Slow WordPress Plugins SQL Queries as well as plugin to Track which plugin takes most time to execute, this are:
 

 

a) P3 Plugin Performance Profiler  

runs a scan over your site to determine what resources your plugins are using, and when, during a standard page request. P3 PPP Can even create reports in a beatiful Excel like Pie chart sheet.

p3-plugin-performance-profiler-godaddy-screenshot-debian-gnu-linux-wordpress-website

Another useful thing to see with P3 PPP is Detailed Timeline it shows when the plugins are being loaded during new page request so you can see if there is a certain sequence in time when a plugin slows down the website.

detailed_timeline-wordpress-p3-performance-plugin-on-website-screenshot

The pictures says it all as P3 PPP is Godaddy's work, congrats to GoDaddy, they've done great job.

 

b) WordPress memory Viewer WP plugins

Is useful to check how much memory each of WordPress plugin is taking on user (visitor) request.
Memory Viewer is allows you to view WordPress’ memory utilization at several hooks during WordPress’ execution. It also shows a summary of MySQL Queries that have ran as well as CPU time.
To use it download it to plugins/ folder as usual enable it from:

Installed Plugins -> (Inactive) -> Memory Viewer (Enable)

To see statistics from Memory Viewer open any post from your blog website and scroll down to the bottom you will notice the statistics, showing up there, like on below screenshot.

wordpress-memory-viewer-plugin-debian-gnu-linux-hosted-website-show-which-plugin-component-eats-most-memory-in-wordprses-blog
 

Though WP Memory Viewer is said to work only up to WP version 3.2.1, I've tested it and it works fine on my latest stable WordPress 4.1 based blog.

c) WordPress Query Monitor

wordpress-query-monitor-plugin-to-monitor-track-and-optimize-problems-with-sql-caused-by-wp-plugins.png
 

Query Monitor is a debugging plugin for anyone developing with WordPress but also very helpful for anyone who want to track issues with plugins who use the database unefficient.
It has some advanced features not available in other debugging plugins, including automatic AJAX debugging and the ability to narrow down things by plugin or theme.
You can view plenty of precious statistics on how enabled plugins query the database server, here is a short overview on its Database Queries capabilities:

  • Shows all database queries performed on the current page
  • Shows affected rows and time for all queries
  • Show notifications for slow queries and queries with errors
  • Filter queries by query type (SELECT, UPDATE, DELETE, etc)
  • Filter queries by component (WordPress core, Plugin X, Plugin Y, theme)
  • Filter queries by calling function
  • View aggregate query information grouped by component, calling function, and type
  • Super advanced: Supports multiple instances of wpdb on one page
  • Once enabled from Plugins you will see it appear as a new menu on bottom Admin raw.

An important note to make here is latest Query Monitor extension fails when loaded on current latest Wordpress 4.1, to use it you will have to download and useolder Query Monitor plugin version 2.6.8 you can download it from here

d) Debug Bar

If you want you want a Memory Viewer like plugin for more complex used components memory debugging, reporting if (WP_DEBUG is set in wp-config.php) also check out Debug Bar .
For me Debug Bar was very useful because it show me depreciated functions some plugins used, so I substituted the obsoleted function with new one.

 

debug-bar-debug-wordpress-plugins-memory-use-screenshot-website


4. Server Hardware hungry (slow) WordPress plugins that you better not use

While spending time to Google for some fixes to WP slow query plugins – I've stumbled upon this post giving a good list with WordPress Plugins better off not to use because they will slow down your site
This is a publicly well known list of WP plugins every WordPress based site adminstrator should avoid, but until today I didn't know so my assumption is you don't know either ..

Below plugins are extremely database intensive mentioned in article that we should better (in all cases!) avoid:

  • Dynamic Related Posts
  • SEO Auto Links & Related Posts
  • Yet Another Related Posts Plugin
  • Similar Posts
  • Contextual Related Posts
  • Broken Link Checker — Overwhelms even our robust caching layer with an inordinate amount of HTTP requests.
  • MyReviewPlugin — Slams the database with a fairly significant amount of writes.
  • LinkMan — Much like the MyReviewPlugin above, LinkMan utilizes an unscalable amount of database writes.
  • Fuzzy SEO Booster — Causes MySQL issues as a site becomes more popular.
  • WP PostViews — Inefficiently writes to the database on every page load. To track traffic in a more scalable manner, both the stats module in Automattic’s Jetpack plugin and Google Analytics work wonderfully.
  • Tweet Blender — Does not play nicely with our caching layer and can cause increased server load.


A good Complete list of known WordPress slow plugins that will hammer down your wordpress performance is here

There are few alternatives to this plugins and when I have some free time I will download and test their alternatives but for now I plan the plugins to stay disabled.
 

For the absolute WP Performance Optimization Freaks, its good to check out the native way to Debug a wordpress installation through using few embedded
variables

 

define('WP_DEBUG', true);
define('WP_DEBUG', false);
define('WP_DEBUG_LOG', true);
define('WP_DEBUG_DISPLAY', false);
define('SAVEQUERIES', true);

 

An article describing how you can use native WP debug variables is here


Happy Optimizing  ! 🙂